Windows 7 Sleep Command

Kones

New Member
#1
Hi, I'm new of here.

Could anyone tell me the sleep command of Windows 7?

I have try that:
Rundll32.exe Powrprof.dll,SetSuspendState Sleep

but it doesn't work, it will become hibenate.


My powercfg

C:\>powercfg -a
此系統有以下幾種睡眠狀態: 待命 ( S1 S3 ) 休眠 混合式睡眠
此系統缺乏以下幾種睡眠狀態:
待命 (S2)
系統韌體不支援此待命狀態。

It seems my computer doesn't support the Sleep mode, but I can click the "sleep" option in Start menu and it run perfectly.

Anyone can help? Thanks.

Sorry for the Chinese
character, I cann't find a way to modify Windows response in English.
 


Mitchell_A

Essential Member
#2
Hello, and welcome to the forums :)
You're trying to use Command Prompt to put your computer into sleep mode, correct?
 


Captain Jack

Extraordinary Member
#3
Hi, I'm new of here.

Could anyone tell me the sleep command of Windows 7?

I have try that:
Rundll32.exe Powrprof.dll,SetSuspendState Sleep

but it doesn't work, it will become hibenate.


My powercfg

C:\>powercfg -a
此系統有以下幾種睡眠狀態: 待命 ( S1 S3 ) 休眠 混合式睡眠
此系統缺乏以下幾種睡眠狀態:
待命 (S2)
系統韌體不支援此待命狀態。

It seems my computer doesn't support the Sleep mode, but I can click the \\"sleep\\" option in Start menu and it run perfectly.

Anyone can help? Thanks.

Sorry for the Chinese
character, I cann't find a way to modify Windows response in English.
Hello,

In Windows 7 you have to disable the Hibernation in order for Sleep command to work through Command Prompt or Batch file. You can check this Tutorial as well Sleep Shortcut - Vista Forums its for Vista it should work for Windows 7. Just make sure you disable Hibernation follow this link to disable it Hibernate - Enable or Disable - Windows 7 Forums

Hope this helps,
Captain
 


Kones

New Member
#4
Thanks , Captain Jack and Mitchell_A.
 


Mitchell_A

Essential Member
#6
Cheers! Thanks for using the forums, see you around :)
 


#7
You must first disable Hibernate in windows and then put the computer in Sleep state. Use following two commands:
powercfg -hibernate off
rundll32.exe powrprof.dll,SetSuspendState 0,1,0

and for doing reverse action, Hibernating the computer, use commands below:
powercfg -hibernate on
%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Hibernate
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.
Top