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

13 Responses to “Restart or Shutdown Windows (XP, 2000 and Vista) from Command Line or One-Click Shortcut”

  1. sai sandeep
    November 4th, 2009 14:05
    13

    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?

  2. Joe
    July 7th, 2009 03:00
    12

    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.

  3. Eddie
    June 30th, 2009 03:08
    11

    Worked like a charm in Vista with the “-” or “/” operators.

  4. laxman
    June 18th, 2009 15:17
    10

    “shutdown -s -t 01″ Here “01″ Means time for shutdown in no. of Seconds.

    ex: c:/shutdown -s -t 01

  5. Alan
    March 23rd, 2009 06:33
    9

    Works a treat in XP. I now have a great little system that reboots if a crash occurs in any of my apps. Thanks

  6. John
    January 15th, 2009 12:06
    8

    I do not get why should the -t argument is reduced to 600 seconds in Vista. Please give us a workaround

  7. Herunterfahren oder Neustart von Windows 2000, Xp und Vista per “Command Line” « creative generation
    December 27th, 2008 01:24
    7

    [...] Beispiele und ausführliche Erklärungen in engl. [...]

  8. TVD
    October 26th, 2007 03:57
    6

    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.

  9. Alex
    September 13th, 2007 09:22
    5

    That command doesn’t do anything for standby or hibernate.

  10. Peter
    June 30th, 2007 04:53
    4

    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.

  11. Magudamudi
    February 16th, 2007 13:21
    3

    give dos commands for shut downing the windows 2000, xp

  12. Chris
    February 15th, 2007 01:40
    2

    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.

  13. Soeren
    February 12th, 2007 20:25
    1

    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.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.

New Articles

Incoming Search Terms for the Article

command line restart - restart windows command line - restart from command prompt - restart command line - windows restart command line - cmd restart - windows restart command - windows command line reboot - command to restart windows - command line reboot - restart cmd - windows xp restart command - windows command line restart - how to restart windows from command line - restart pc from command line - reboot from command line - restart command - shutdown vista command line - restart windows from command line - reboot windows command line - reboot command windows - windows xp command line reboot - reboot pc from command line - command prompt restart - command line restart windows xp - reboot windows xp command line - restart from cmd - windows reboot command - restart windows xp command line - xp restart command - command line shutdown - shutdown windows command line - restart command vista - shutdown command vista - windows xp restart command line - reboot vista command line - restart windows cmd - remote shutdown vista - restart from command line - shutdown windows command - windows reboot command line - windows cmd reboot - windows restart from command line - windows xp command line restart - how to restart from command prompt - restart command prompt - vista shutdown command - windows shutdown command line - cmd restart command - cmd shutdown vista - windows xp reboot command line - reboot windows from command line - restart in command prompt - command line restart windows - restart windows command - vista restart command - windows command line shutdown - command to reboot windows - command line to restart windows xp - restart vista command line - shutdown command line - restart vista from command line - command reboot windows - restart windows from cmd - command line shutdown windows - windows command reboot - command restart windows - reboot command for windows - restart command for windows - restart pc from command prompt - windows command to restart computer - windows xp reboot cmd - how to restart windows from command prompt - shutdown windows xp command line - windows command restart -