Wednesday, February 24, 2010

Shutdown command in windows

Some time ago i wanted to leave my computer running for a short time only, not all night. I was looking for a way to do this without installing a new program in windows. All i wanted was to schedule the computer for shutdown after 15 minutes.

I started looking for an easy way to do this and preferably without installing another program. So i found out that windows command line has a built in command called shutdown.
This was all that i needed. Much easier and time saving than looking for an appropriate program, downloading and installing it. Also it is easy to use. Just open the run dialog from start menu (click here if you can not find it) and type:

shutdown /s /t 60 
This means that the system will power of (/s argument) in 60 seconds (/t 60 argument). If you want more time just increase the number of seconds.
Now lets say that the time you entered is not enough. To abort the shutdown process just type:
shutdown /a
The command also has many other arguments. some of them are:

Argument Meaning
/i
Display the graphical user interface (GUI). When used this must be the first option.
/t xxx
Set the time-out period before shutdown to xxx seconds.
The valid range is 0-315360000 (10 years), with a default of 30.
/s
Shutdown
/l
Log off
/r
Shutdown and restart the computer.
/p
Turn off the local computer with no time-out or warning.
/h
Hibernate computer.

This command is available in:
Windows XP
Windows Vista
Windows 7 

No comments: