I was able to make a script to run "shutdown -a" (abort) constantly, but I would like to take it one step further.
Code: Select all
:start
shutdown -a
goto start
When "shutdown -a" runs and there is no shutdown to abort, it displays:
Unable to abort the system shutdown because no shutdown was in progress.(1116)
When there is a shutdown to abort, and it aborts it, the program exits without displaying anything at the command prompt.
What I would like to do is have it hide all the output (@echo off), and print a message to the window if a shutdown was aborted.
Does anyone have some advice as to where I should start?