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?

link|improve this question

feedback

1 Answer

up vote 8 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.

link|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
Hmmm. Very good! But "at" command works only with admin privileges...... :( – kokbira May 10 '11 at 19:51
feedback

Your Answer

 
or
required, but never shown

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