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.



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

  1. 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.

  2. 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.

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

    give dos commands for shut downing the windows 2000, xp

  4. 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.

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

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

  6. 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.

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 without commenting


Custom Search

New Articles

Incoming Search Terms for the Article

vista shutdown command - restart vista - restart pc from command line - vista command line shutdown - shutdown command vista - vista shutdown command line - restart pc command line - reboot vista command line - vista command line reboot - windows vista shutdown shortcut - restart pc from command prompt - reboot vista - reboot vista remotely - vista command line restart - Vista Shutdown shortcut - shutdown command in vista - shutdown vista command - vista reboot command line - shutdown vista command line - Restart Vista remotely - vista restart - vista restart command - restart vista command line - reboot vista from command line - shortcut shutdown vista - shutdown shortcut vista - command line reboot vista - restart vista from command line - restart pc from cmd - shutdown vista remotely - vista reboot - windows vista shutdown command - all - vista reboot command - command line shutdown vista - command line restart pc - restart shortcut vista - vista shutdown cmd - vista restart shortcut - command line restart vista - command line to restart pc - how to restart vista - shutdown vista - vista cmd shutdown - vista restart command line - command to shutdown vista - restarting vista - how to shutdown vista - shutdown Vista from command line - vista command shutdown - reboot pc from command line - shutdown vista cmd - shutdown shortcut for vista - shortcut to shutdown vista - shutdown command for vista - vista shutdown commands - vista shutdown command prompt - remote shutdown vista - reboot vista from command prompt - restart command vista - vista standby command - restart pc command prompt - shutdown command line vista - cmd shutdown vista - restart in vista - reboot command line Vista - cmd restart windows - RESTART WINDOWS COMMAND LINE - command shutdown vista - how to reboot vista - reboot command vista - restart vista from command prompt - remotely reboot vista - restart windows vista command line - restart vista command -