1

I reboot a remote computer with Wake-on-Lan and I would like to know if there is a way to know that the computer is idling at login screen (so I can start to do the stuff that need to be done).

Wildhorn
  • 926
  • 1
  • 11
  • 30
  • Can you install a service on the workstation that reports its status back to a central location, or are you asking if you can get this information remotely, without anything installed on the remote client itself? – SqlRyan Sep 03 '10 at 17:42
  • How do you want to know it is at the login screen? With C#? – Nitrodist Sep 03 '10 at 17:43
  • @rwmnau: Yes remotely. Maybe a WMI command that check it. @Nitrodist: Check tags – Wildhorn Sep 03 '10 at 17:53
  • 2
    Not that i have tried it, but could you ping the IP address of the machine. Whilst it the network connection is registered before the login screen it could give an indication if its active. – JonWillis Sep 03 '10 at 18:37
  • @JonWillis: That's the right answer. At least the simplest answer by far. – Gabriel Magana Sep 15 '10 at 19:47
  • What stuff needs to be done? If its using a network service, then why not probe for the service? – Christian V Sep 15 '10 at 19:51
  • @gmagana: not a bad guess then :) – JonWillis Sep 15 '10 at 21:34

2 Answers2

6

You could use a Wmi query to Win32_OperatingSystem and get the LastBootupTime. If it changed since you last queried it then you can know that its booted up and responding to WMI queries, which usually means its up and running.

You could also ping, but i believe ping can respond even if the computer hasn't fully booted up yet. You could ping then wait for 60 seconds then try.

Ultimately though, its not the login screen which let's you know you can do things (unless you want to do things on the computer itself). If you want to do things through WMI, you should check WMI connectivity instead.

Mark
  • 5,223
  • 11
  • 51
  • 81
  • Ping will respond when the network drivers and protocol stack is loaded, so yes, it will respond before the login screen appears. – Christian V Sep 15 '10 at 19:50
1

try to ping it or connect over TCP/IP to some service that is listening. I am pretty sure there are services listening even though you have not logged in.

Derar
  • 462
  • 1
  • 4
  • 12