Sometimes you may want to quickly click on a shortcut or create a keyboard shortcut that will accomplish the task. If so, here's a quick way to create those shortcuts to execute either restart, shutdown or hibernate.
Windows XP and Vista, include the built-in command shutdown.exe that will restart, shutdown and log off (Vista shutdown command includes the option to hibernate) your Computer. The shutdown command is also available for Windows 2000 and 2003 servers.
The basic options for shutdown.exe for both XP and Vista are:
- -l Log off
- -s Shutdown the computer
- -r Shutdown and restart the computer
- -t xx Set timeout for shutdown to xx seconds
On Vista (only) the hibernate option is
- -h Hibernate the local computer.
To create a shortcut to shutdown your Computer, right click on the Desktop (or where you want to create a shortcut), and select New \ Shortcut. In the Type the location of the item text field enter:
%SystemRoot%\System32\shutdown.exe -s
NOTE: following screen shots are from Vista. Windows XP Create Shortcuts wizard will look a little different but the steps are the same. The %SystemRoot% is a System variable for C:\Windows folder.
Then click next to continue and give the shortcut a name and click Finish.
If you want to delay the time for restart, shutdown, log off, or hibernate (Vista only), you can use the -t switch to set a timeout delay for the command to execute. In the example above, adding timeout to the command for 10 seconds would look like this:
%SystemRoot%\System32\shutdown.exe -t 10 /s
Subscribe to my feed