Kones

New Member
Joined
Mar 4, 2010
Messages
4
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.
 


Solution
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
Hello, and welcome to the forums :)
You're trying to use Command Prompt to put your computer into sleep mode, correct?
 


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
 


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
 


Solution
Back
Top