I am working with 4 computers. Shutting off computer #1 will turn the power off to the other 3 computers. My task is to write a program to allow a user to shut off all four computers with one click.
In order to do this, I have to be able to let computer #1 know when the other computers are completely shutdown so it will know it is safe to shut itself off. This is further complicated because windows updates installing on shutdown means that the time it takes for a PC to shutdown is variable.
Is there a way I can tell if a computer is completely shutdown and finished with updates in code, over a network?
Edit: I tried to ping during an update and unfortunately I did not get a response during the later stages of the update.
Edit 2: Meatspace's suggestion of looking at reboot.xml and pending.xml is helpful. However instead of trying to predict how long an update will take I will check for pending updates using these files and if there are any I will restart computers 2, 3, and 4 instead of shutting them down. After all three have restarted I will send a signal to computer 1 to shutdown in 5 min while having computers 2, 3, and 4 shut themselves down.