Sunday, August 21, 2011

shutdown your PC at schedule time


This is a small blog to show how easily you can shutdown your PC{windows only} on a schedule time or just by double clicking on a file to shutdown....

Shutdown in 30 sec:::
Open notepad or anyother  text editor you are comfortable with...
write the following command in it
shutdown -s
 save this file as “shutdown.bat” remember to include double quotes otherwise you will have a file as shutdown.bat.txt..
This  is default option for shutdown . After double clicking on shutdown.bat it will show a msg that your PC is going to shutdown in 30 sec.

Note :- writing anything in a single line in a bat file is same as executing that command in command prompt....

Shutdown after a fixed time:::
the command is
shutdown -s -t 3600

the 3600 is time in sec , the default value is in secs. You have to convert your time period in sec for this default configuration.
The above command will make your PC shutdown in 1 Hour .

Cancel a shutdown:::
Make another bat file named as “shut_abort.bat” and write following in it..
shutdown -a
This command will abort any scheduled shutdown if u just double click on the file..


LogOff:::
This command will logout your session
shutdown -l

Restart:::
This will restart your PC
shutdown -r

No comments:

Post a Comment