Possible Duplicate:
What is the command to use to put your computer to sleep (not hibernate)?

When I try to create a sleep shortcut in windows 7 x64 using this code:

C:\Windows\System32\rundll32.exe Powrprof.dll,SetSuspendState Sleep
C:\Windows\System32\rundll32.exe Powrprof.dll,SetSuspendState
C:\Windows\System32\rundll32.exe Powrprof.dll,SetSuspendState 0.1.0

Then Windows hibernates instead of going to sleep.

I don't want to turn off hibernate as I do still want to be able to use it.

How do I make this work to make my computer go to sleep?

link|improve this question
feedback

closed as exact duplicate by Mokubai, Sathya Sep 3 '11 at 19:46

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

1 Answer

Do not call these functions from rundll32. They were not designed to, and if you do, you are basically passing garbage as arguments.

You can use PsShutdown to suspend the computer (psshutdown -d) or write a tiny program of your own (someone already did1).


1 Compiled version.

link|improve this answer
Thank you very much that work with me – Fuj1tsu Sep 4 '11 at 9:20
feedback

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