Restart or Shutdown Windows (XP, 2000 and Vista) from Command Line or One-Click Shortcut
If you getting tired of everytime have to clicking Start menu, and then click on Turn Off Computer, and then still have to click on Turn Off or Restart or Log Off in order to log off, restart or shut down your computer, and feel that it’s time wasting, you can create a one-click shortcut that allows the user to shutdown or restart Windows, or go into standby or hibernate mode, with just a single click on the shortcut itself. Best of all, the shortcut can be put at any place - desktop, Quick Launch bar, or Start Menu, and can even launch the shutdown or restart process from command line or command prompt.
In order to shutdown or restart the Windows with just one click shortcut or from command prompt or command line, users can use shutdown command line utility/command that comes with Windows 2000 (with the Resource Kit installed) and Windows XP or Windows Vista (native). To access shutdown command, simply go to DOS command prompt by clicking on Start -> All Programs -> Accessories -> Command Prompt or Start -> Run and then type in Cmd to launch a command prompt window.
To create a one-click shortcut to shutdown the Windows computer, right click on your desktop or any folder (or click at File at toolbar), and then select New, and then click on Shortcut. A New Shortcut wizard will ask for location of this item. In the textbox, type “shutdown -s -t 01″ (without quotation marks). Click on Next when done. When ask for a name for the shortcut, give any descriptive name you prefer, such as Shutdown. Then click on Finish, and you can now use the shortcut created to shut down PC immediately after click.
If you want to create a shortcut that quick restart the Windows instead of shutting down the computer, follow the above instruction, but “shutdown -s -t 01″, key in “shutdown -r -t 01″ for location of this item. Again, give a proper descriptive name to the shortcut, such as Restart, and the shortcut is ready to be used to restart the Windows right after click.
As in the shutdown command above, -s parameter will shutdown the computer, while -r will shutdown and restart the computer. -t 01 set the timeout or time to lapse in seconds for a shut down or restart to begin. By default, if no -t argument is specified, shutdown command will wait for 30 seconds countdown before shutdown or restart. The best part for shutdown command is that it can abort a system shutdown, by using -a as the option for shutdown, i.e. “shutdown -a”. There are other options or parameters that available, and users can view all of the flags with “shutdown /?” command at command prompt.
The options available for shutdown are:
No arguments : Display this message (same as -?)
-i : Display GUI interface, must be the first option
-l : Log off (cannot be used with -m option)
-s : Shutdown the computer
-r : Shutdown and restart the computer
-a : Abort a system shutdown
-m \\computername : Remote computer to shutdown/restart/abort
-t xx : Set timeout for shutdown to xx seconds
-c “comment” : Shutdown comment (maximum of 127 characters)
-f : Forces running applications to close without warning
-d [u][p]:xx:yy : The reason code for the shutdown
Share and contribute or get technical support and help at My Digital Life Forums.
Related Articles
- Schedule Windows Shutdown with Vista Shutdown Sleep Timer
- Fast Shutdown Faster Windows 2000, Windows XP, Windows 2003 and Windows Vista
- Display Run Command in Start Menu of Vista
- Comprehensive List of Command Prompt Keyboard Accelerators (Shortcut Keys)
- Create and Put an Elevated Command Prompt on Windows Vista Desktop or Start Menu
- Quick Shutdown Your Computer
- 10 New Executables and 20 Old Commands in Windows Vista
- Running Multiple Instances of Google Talk (GTalk Polygamy) and Login as Multi Users
- Automatically Shutdown Computer With Auto Shutdown Genius
- How to Open Elevated Command Prompt with Administrator Privileges in Windows Vista

































February 12th, 2007 20:25
This does not work on Windows Vista. In Vista you have to use / and not - in front of the arguments. Also the /t argument has been limited to 600 seconds max.
February 15th, 2007 01:40
What is the ‘Windows 2000 Resource Kit’ referred to in the article and where can I get it? I thought the obvious choice would be the Windows Components add/remove screen, but it is not there.
February 16th, 2007 13:21
give dos commands for shut downing the windows 2000, xp
June 30th, 2007 04:53
The argument /t was reduced to 600 seconds already in XP64, and that is anoying *argh* Please post a reply if you now how to circumvent this. Thx.
September 13th, 2007 09:22
That command doesn’t do anything for standby or hibernate.
October 26th, 2007 03:57
The Restart shortcut provided above worked just fine for me in Vista. Haven’t tested the Shutdown command yet. I appreciate the post, as there was no way I could guide my parents to find the commands on the new Start menu. I just stuck the shortcuts on the desktop. Problem solved.