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

SpringLearner
  • 481
  • 3
  • 10
  • 15
  • What's wrong with PowerShell? Allergic? – Ƭᴇcʜιᴇ007 Mar 24 '15 at 18:10
  • @Ƭᴇcʜιᴇ007 how can one be allergic to computer codes? – SpringLearner Mar 24 '15 at 18:11
  • I suggest you may be allergic because "I don't want to use PowerShell" seems like a very arbitrary limit to impose... :) – Ƭᴇcʜιᴇ007 Mar 24 '15 at 18:12
  • @Ƭᴇcʜιᴇ007 I am describing in brief.I have to 2 system one is server and it has public ip and another is only connected to LAN but no internet.My requirement is to start/turn off the computer(the computer which is not connected to internet) I am successful in shutting down.But dont know how to start.So I dont want to use power shell – SpringLearner Mar 24 '15 at 18:20
  • @Ƭᴇcʜιᴇ007 dont you think the linked question has not got any answer to start the computer? – SpringLearner Mar 24 '15 at 18:22
  • The answers don't make it a different _question_. If you'd like newer/different answers to an existing question, feel free to place a [bounty](http://superuser.com/help/bounty) on it. Anyhow, the existing answers do mention ways to wake it (WOL, BIOS wake timers). Plus I just stuck an answer on it explaining how you can wake the computer via Task Scheduler (I was surprised it wasn't mentioned already). – Ƭᴇcʜιᴇ007 Mar 24 '15 at 18:29

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/

Zvi Twersky
  • 382
  • 9
  • 24