How do you programmatically put Windows into Hybrid Sleep, without temp开发者_如何学运维orarily changing the settings? (The settings are initially set up such that Sleep goes into standby, and Hibernate goes into hibernate.)
you can use it from command line prompt:
to Shutdown: shutdown.exe
to Lock: Rundll32.exe user32.dll,LockWorkStation
to Sleep: Rundll32.exe powrprof.dll,SetSuspendState Sleep //Hibernate must be OFF
to Hibernate: Rundll32.exe Powrprof.dll,SetSuspendState //Hibernate must be enabled
Use
^!Numpad9::DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
^!Numpad8::DllCall("PowrProf\SetSuspendState", "int", 1, "int", 0, "int", 0)
in AutoHotkey. You'd then have to press Ctrl+Alt+Numpad9. Ctrl+Alt+Numpad8 is for putting it into hibernation mode.
精彩评论