开发者

How do you put a computer into Hybrid Sleep?

开发者 https://www.devze.com 2023-03-04 22:52 出处:网络
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 Hiberna

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消