1

I want to start and shutdown at some given time. For example if I want to shutdown after 1 hour then I can simply right click then create a shortuct and type shutdown -s -t 3600 then my computer will shutdown after 1 hour.Is there any way to wake up from sleep mode or restart computer or simply start the computer using batch scripting or like the way I am doing to shutdown or any other way?

Note I dont want to use powershell

1 Answers1

1

Command line (so you can enter a time and make a batch file) For example: -m \Computer Specifies a specific computer on the network that you want to shut down or reboot. Absent this parameter, the command affects only the local PC on which it is run.

For shutdown: shutdown -s -t 00

For restart: (the -r parameter is for when to restart)

c:\windows\system32\shutdown -r -t 00

So you can have two batch files. One for shutdown and one for restart. The batch file for shutdown would call the restart file right before it runs. You would use a delay command in the shutdown file like SLEEP PAUSE or TIMEOUT.

Here are all the parameters: http://www.tekrevue.com/tip/shut-down-and-reboot-remote-pc/