Wednesday, June 3, 2009

Shutdown & Restart Shortcuts for Windows XP & Windows 2000

Windows 2000 (with the Resource Kit installed) and Windows XP (natively) have an actual shutdown command that can be launched from a command prompt — and which, therefore, also can be launched from a shortcut. To see all available options for this command, click Start, click Run, type CMD, and click OK. Then, in the box that appears, type:

SHUTDOWN /?

You can also study the available options in the Microsoft KB 317371, “How to Use the Remote Shutdown Tool to Shut Down and Restart a Computer in Windows 2000.” (The article is basically suitable for Win XP also.)

This command starts a 30-second countdown for a shutdown or restart, which permits you to abort it (with a shutdown -a command). It you want the command to execute, use the -t flag, which lets you set the time lapse in seconds. The examples below use a 1-second delay.

For a shortcut to RESTART Windows XP:
SHUTDOWN -r -t 01

For a shortcut to SHUT DOWN Windows XP:
SHUTDOWN -s -t 01

Unfortunately — especially on Windows XP — this option only shuts down Windows. It does not shut down your computer, at least on most hardware. For that, on Win XP (and for most Win 2000 users also), I recommend the freeware utility Shutdown.exe (not to be confused with the Windows utility by the same name) by MS-MVP Andrej Budja. I’ve seen several shutdown utilities recommended, but this is the only one that I’ve seen actually shut down Windows XP and then powerdown the computer behind it. For more information on the tool, see here. After you place this utility in the root folder of C:, the commands for a shutdown, restart, or hibernate (respectively), each without a time delay, would be shutdown -u -t 0 for shutdown, shutdown -r -t 0 for restart, and shutdown -h -t 0 for hibernate.