Sutdown.exe XP
A co-worker showed me a quick way to shut down and restart a computer. I was really interested because I use Microsoft Remote Desktop feature to connect to a Domino server. The Domino server is on an older computer with a very loud fan so the less it runs the better. My problem was I did not have the option to shut down the machine from the start menu.. I now have two shortcuts on the desktop, one to turn off the machine and a second to cancel the shut down.
Common shortcuts
ShutDown.exe -l (Logoff)
ShutDown.exe -s -t 30 (Shut Down)
ShutDown.exe -r -t 1 (Restart Now)
ShutDown.exe -r -t 30 (Restart)
ShutDown.exe -a (Cancel)
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)
If you are interested in selecting the same icon as the "Turn off computer" icons check out the c:\windows\system32\SHELL32.dll. I even assign shortcut keys to launch them easier, which works from anywhere!!! The shutdown command might work on other versions of Windows, but I have not done any testing.
Thanks Tim for the idea.
April 11th, 2005 - 13:19
Good info we use shutdown.exe but we never had a list of all the switches we could use
April 15th, 2005 - 11:30
I am a big fan of “shutdown -r -f -t 0″