I want to put my Windows PC (Windows 7) into a sleep state via command line (so I can bind to macro button on keyboard).
The power button on the PC is setup to but the computer to sleep (but it's down on the floor and I'm too lazy to reach down) it exactly how I want it (sleeps using hybrid mode in case I loose power)
The sleep command on the shutdown menu also works.
most info I found says to use;
%windir%\system32\rundll32.exe PowrProf.dll, SetSuspendState 0,1,0
But this puts the computer in hibernate mode. I do have hibernate disabled but using hybrid sleep.
So, What is the command to use to put your computer to sleep (not hibernate)?
rundll32.exe PowrProf.dll,SetSuspendStateis not recommended. It is dangerous. (Because it corrupts the stack, as it does not comply with the function signature demanded by
Rundll32. Then unforeseeable bad things may happen, as Raymond Chen warns…)