Timed shutdown in Windows?

2010 May 22
by Colin

I recently came across the issue where I was syncing a large number of files to my Dropbox computer at my office– unfortunately, I had an appointment I needed to get to and couldn’t spend an hour waiting for 4,000 files to get uploaded. My options were to shut the computer down (and not have access to the files until the next day) or leave the computer running all night (with logged in credentials). Or were they? Few people know that Windows actually has a built in shutdown timer within the DOS prompt.

Press the start button, click on Run, and type “cmd.” Press enter.

The shutdown flag allows you to shut down (or restart) either a local or remote machine. Used without parameters it merely logs the user off. However you can add…

-l : Logs off the current user, this is also the defualt. -m ComputerName takes precedence.

-s : Shuts down the local computer.

-r : Reboots after shutdown.

-a : Aborts shutdown. Ignores other parameters, except -l and ComputerName. You can only use -a during the time-out period.

-f : Forces running applications to close.

-m [\\ComputerName] : Specifies the computer that you want to shut down.

-t xx : Sets the timer for system shutdown in xx seconds. The default is 20 seconds.

-c message : Specifies a message to be displayed in the Message area of the System Shutdown window. You can use a maximum of 127 characters. You must enclose the message in quotation marks.

-d [u][p]:xx:yy : Lists the reason code for the shutdown. The following table lists the different values.

For example, when you use the command window and type…

shutdown -s -f -t 3600

… it shuts down the machine (-s) while forcing applications to close (-f) in one hour (-t 3600).  Helpful for situations like the one I outlined above or when you are streaming a movie to an external monitor and don’t feel like getting out of bed after realizing “Jeez, even pirating Couples Retreat was a huge waste of time.”

Find this page useful? Save you a few dollars fixing something?
If you so desire, feel free to kick back a dollar or two to help site upkeep.

No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS