The top answer to this question tells me how to stop/start a remote service. Great. Now, all I need is to wait for the actual stop/start to complete. So, what I\'m looking f
Eric Falsken's solution works perfectly. +1.
But I'd like to add that the timeout command would sometimes fail with error: "Input redirection is not supported, exiting the process immediately"
To fix this I've had to replace the timeout command:
timeout /t 2 /nobreak >NUL
with the following:
ping -n 2 127.0.0.1 1>NUL