I am able to
shut down a remote computer via
shutdown /s /m \\\MachineName
; andcut that remote computer's power supply (think power switch with IP featuring TelNet communication).
I want to execute both tasks sequentially, but for obvious reasons Task 2 should not be invoked before Task 1 has succeeded completely.
Both tasks are executed within an application (VB6). They run as intended, individually. But serially, I need to reliably find out when the remote machine has been shut down completely, before doing Task 2.
So the question is: how can I reliably detect termination of Task 1? Is it even possible? For example, could I use a shell script?
Timing Task 1 is not an option: it can run for an unpredictable duration (think Windows updates, "don't switch off this machine until finished").