Windows XP Shutdown Shortcuts

Are scheduled defragmentation sessions, downloads, or file transfers keeping you up because you’d like to turn off your computer when they’re done?

Are you frustrated when you click Shut Down on your Windows machine but nothing happens? To have better control of your shutdown procedures, I recommend using the command line. This will allow you to have the computer turn itself off at a specified time, to force shutdowns of Windows no matter which program is “hanging”, restart your computer, log off, and even potentially shut down or restart a network computer for which you have administrative rights.

You can enter this command by clicking Start > Run. Type the command “shutdown” without the quotes and modify it with any of the following parameters or arguments:

  • shutdown -i will display a simple graphical interface for shutting down, logging off, or restarting network computers.
  • shutdown -l will log your computer off
  • shutdown -s the most common variant of this command, this simply shuts down your computer the usual way
  • shutdown -r shut down and restart the computer shutdown -a will abort a shut down procedure (if there is a still a countdown running to the shutdown; this command *cannot* be used to halt a shutdown in progress)
  • shutdown -f begins a forced shutdown, kills hanging tasks as soon as the command is issued
  • shutdown -t ?? replace the question marks with any number of seconds, up to an 8-digit integer (this means you can have your computer shutdown from 0 seconds up to roughly 1157 days, or 3 years and 2 months in the future.)
  • shutdown -c if you have scheduled a shutdown, logoff, or restart, you may use 127 characters or less to inform the user about the reason for the shutdown

These parameters can be applied as a string. For example, if I wished to shut down my computer 4 hours and 30 minutes from now, and to ensure that it did not hang and thus stay on until morning, I would click Start, then Run, then I’d enter “shutdown -s -f -t 16200” without the quotes. Likewise, if I got up during the night and decided that I should keep the computer on after all, I’d enter the command “shutdown -a” while the timer was still on. The -t ?? parameter is very useful, and can be applied in conjunction with almost any other parameter.

Please note that arguments for the shutdown command need to be issued in this order: -i -l -s -r -a -f -t ?? -c This means that if you wanted to combine a comment code with a forced restart command and a timer, you’d have to write the string in this fashion: “shutdown -r -f -t ?? -c ???” with the question marks replaced by values.