Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to suspend my windows machine after a specified time like

shutdown -s -t 3600

but I don't want to turn it off, but only switch to suspend mode. Is there a command line to do this?

share|improve this question

1 Answer 1

up vote 10 down vote accepted

Use the at command, running the command to put the computer to sleep. The shutdowncommand doesn't have a sleep parameter.

at <time> rundll32 powrprof.dll,SetSuspendState

you'll find more information about at and its parameters here.

Instead of the rundll32command, you could use an alternative command-line program, like sleep.exe for instance.

share|improve this answer
    
Thanks for reminding me about sleep.exe, had totally forgotten about this little gem. –  CGA Nov 26 '09 at 9:44
    
Thanks for the quick answer. –  tangens Nov 26 '09 at 20:24
1  
Hmmm. Very good! But "at" command works only with admin privileges...... :( –  kokbira May 10 '11 at 19:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.