Shutdown Script

naveengowdar

Distinguished
Jul 12, 2010
5
0
18,510
Hello,

i am trying to run my application after user commands, shutdown using shutdown scripts. here i need to know what is been commanded(shutdown or restart). so is there anyway to get this data. thanks in advance
 

lazyperson17

Distinguished
Jul 14, 2010
450
0
18,810
Well if im reading this correctly, you have confidence that it will do one or the other. So my suggestion would be to run the scripts and see what happens. If it restarts, then you know something is wrong in the script (if it is a full and final shutdown that your looking for).

This should get you the data your looking for.
 


The shutdown script calls Shutdown.exe, and if a "turn off the computer" was selected it passes -s -t 0 to shutdown.exe/

If the shutdown script calls for a restart, it passes -r -t 0 to shutdown.exe.