views:

93

answers:

2

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).

+2  A: 

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 logic 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
Ping will respond when the network drivers and protocol stack is loaded, so yes, it will respond before the login screen appears.
Christian Vik
+1  A: 

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