Updated version of the shutdown utility is ready for download. Thanks to Tom for reporting a bug in the previous version.
Fixed Memory Leak, which let the program consume up to 160MB.
Fixed /eb switch generating a file instead, changed argument syntax to /ebM:xxx and /ebL:xxx
ShutdownTool.exe [/t] [/d] [/m] [/r | /l] [/f] [/c] [/eb] [/es] [/er]
No args Shutdown procedure with default settings.
/? Display help.
/t:xxx Sets countdown time to xxx seconds. (Default 60)
/m:xxx Sets max allowed extension to xxx minutes. (Default 1440)
/d:”xxx” Sets description to xxx.
This can also be set, by placing a .txt file next to the tool.
/r Change action to Reboot instead of default Shutdown.
/l Change action to Logoff instead of default Shutdown.
/f Forces the chosen action.
/c Disables the option to abort. Also triggers /f
/e:xxx Deprecated (use /es<xxx instead)
/ebM:xxx Only run if last boot time was more than xxx hours ago.
/ebL:xxx Only run if last boot time was less than xxx hours ago.
/esM:xxx Only run if last shutdown time was more than xxx hours ago.
/esL:xxx Only run if last shutdown time was less than xxx hours ago.
/er:”p”==”v” Only run if (p)RegistryKey value equals (v)Value.
/er:”p”!=”v” Only run if (p)RegistryKey value not equals (v)Value.
Command: /t:300 /m:60 /d:”Because I said so!” /f /c
Description: Shutdown the computer in 300 seconds(t),
with the ability to postpone a total of 60 minutes(m),
force the shutdown(f), and disable the ability to abort(c).
Description: Shuts down the computer in 60 seconds,
with the ability to postpone a total of 1440 minutes,
only if the value of registry key Name equals Coretech(er).
Description from text file:
Include a .txt file in the same folder, with the same name as the program.
Include a picture in the same folder, with the same name as the program.
i.e ShutdownTool.png, ShutdownTool.jpg or ShutdownTool.bmp”
All creadit goes to Claus Codam, System Center developer.