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
Related Articles
- Fast Shutdown Faster Windows 2000, Windows XP, Windows 2003 and Windows Vista
- Schedule Windows Shutdown with Vista Shutdown Sleep Timer
- Run Command Prompt Window as Administrator by Right Click Computer in Vista
- Reveal and Access to Windows Vista Hidden Context-Sensitive (Right Click) Menu Item – Open Command Prompt Here & Copy as Path
- Open File Location Menu Item Is Missing or Not Showing When Right Click on Shortcut in Windows Vista
- Show Encrypt and Decrypt Files in Right Click Shortcut Menu in Windows Vista
- How to Remotely Enable Remote Desktop (Terminal Services or RDP) via Registry in Windows 2000/XP/2000/Vista/2008
- Put Disk Cleanup Shortcut to Vista Computer Right Click Menu
- Control Windows Media Player Behaviour with Command Line Parameters
- How to Terminate or Stop and Restart Explorer.exe Shell in Windows XP and Vista Cleanly and Gracefully Without Reboot PC










































November 4th, 2009 14:05
I have created the short cut icon for shut down but it is showing that “The file shut down could not be found.” What is the reason for this?
July 7th, 2009 03:00
It does work in vista you have to use / when using the command prompt. But if you follow instructions for the shortcut it does work.
June 30th, 2009 03:08
Worked like a charm in Vista with the “-” or “/” operators.
June 18th, 2009 15:17
“shutdown -s -t 01″ Here “01″ Means time for shutdown in no. of Seconds.
ex: c:/shutdown -s -t 01
March 23rd, 2009 06:33
Works a treat in XP. I now have a great little system that reboots if a crash occurs in any of my apps. Thanks
January 15th, 2009 12:06
I do not get why should the -t argument is reduced to 600 seconds in Vista. Please give us a workaround
December 27th, 2008 01:24
[...] Beispiele und ausführliche Erklärungen in engl. [...]
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.
September 13th, 2007 09:22
That command doesn’t do anything for standby or hibernate.
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.
February 16th, 2007 13:21
give dos commands for shut downing the windows 2000, xp
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 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.