/build/static/layout/Breadcrumb_cap_w.png

Powercfg and hibernation

I'm using K-box to hibernate computers on our wan in order to cut cost. I have a mix of W2K and Wxp sp2 & sp3. In order to do so I must make sure the computer has the hibernation feature set on. I do this by executing “powercfg.exe /hibernation on” on the computer remotely. A good percentage of the computers do go into hibernation when I execute shutdown.exe /h. But I have gotten the following error on some. "Hibernate failed: error 50". A quick Google on the error message so-far has not revealed the answer.
Has anybody run into this and do you have a fix?

Thanks
Kris

0 Comments   [ + ] Show comments

Answers (3)

Posted by: bkelly 15 years ago
Red Belt
0
Asked around and got some suggestions...

Windows system error code 50 is ERROR_NOT_SUPPORTED. It could be the BIOS doesn't support hibernate mode. The other common error I have seen in the past with hibernation on Windows is not enough disk space. It requires disk space equal to the size of RAM in the computer to work properly.

I don’t see that “/h” or “-h” is a valid parameter for the shutdown command in XP. Maybe the user has implemented a third party utility, and the computers with the error are missing the needed util?

A couple methods I just came across for hibernating from the XP command line are detailed here:

RUNDLL32 option
http://support.microsoft.com/kb/555569

PSSHUTDOWN option
http://www.howtofixcomputers.com/forums/windows-xp/standby-hibernate-command-line-98504.html
Posted by: keihilin 15 years ago
Orange Senior Belt
0
Hi,

I'm using this topic, because i need some help about POWERCFG and Hibernate option.

I would like to create a package with WISE Script Editor, to set HIBERNATE = ON + set Hibernate AC and DC by 1Hour.

If i open a dos windows (on a laptop) and type in command line :
POWERCFG /HIBERNATE ON (the Hibernate box is checked)
POWERCFG /CHANGE Portable/Laptop /hibernate-timeout-ac 60 (AC time out is set to 1Hour)
POWERCFG /CHANGE Portable/Laptop /hibernate-timeout-dc 60 (DC time out is set to 1Hour)

So, it's ok.

But, when i'm using my script, with exactly the same command (juste replace "Portable/Laptop" by a variable %SCHEME%)
I'm looping without end.. and the package create plenty of process ...
And, the worst thing : the computer settings do not change..

Could you help me to understand why i'm getting this loop ?
[EDIT] It could be a permission issue, no ? Because when i'm typing the command line manually i'm using a user(admin) account. And maybe when the package is running the account used is not the user(admin) account but SYSTEM ?


You can check my script below, Thank you :

[font="courier new"]item: Display Message
Title=PowerCFG
Text=This Tool will change the settings of your computer. Hibernate power scheme will be set to 1 Hour.
Flags=00000100
end
item: Get Registry Key Value
Variable=SCHEME_NB
Key=Control Panel\PowerCfg
Value Name=CurrentPowerPolicy
Flags=00000010
end
item: Get Environment Variable
Variable=COMSPEC
Environment=COMSPEC
end
item: If/While Statement
Variable=SCHEME_NB
Value=0
end
item: Set Variable
Variable=SCHEME
Value=Home/Office Desk
end
item: ElseIf Statement
Variable=SCHEME_NB
Value=1
end
item: Set Variable
Variable=SCHEME
Value=Portable/Laptop
end
item: ElseIf Statement
Variable=SCHEME_NB
Value=2
end
item: Set Variable
Variable=SCHEME
Value=Presentation
end
item: ElseIf Statement
Variable=SCHEME_NB
Value=3
end
item: Set Variable
Variable=SCHEME
Value=Always On
end
item: ElseIf Statement
Variable=SCHEME_NB
Value=4
end
item: Set Variable
Variable=SCHEME
Value=Minimal Power Management
end
item: ElseIf Statement
Variable=SCHEME_NB
Value=5
end
item: Set Variable
Variable=SCHEME
Value=Max Battery
end
item: Else Statement
end
item: Display Message
Title=PowerCFG
Text=Error
Flags=00101000
end
item: Exit Installation
end
item: End Block
end
item: Execute Program
Pathname=%COMSPEC%
Command Line=/c POWERCFG /HIBERNATE ON
Flags=00001010
end
item: Execute Program
Pathname=%COMSPEC%
Command Line=/c POWERCFG /CHANGE %SCHEME% /hibernate-timeout-ac 60
Flags=00001010
end
item: Execute Program
Pathname=%COMSPEC%
Command Line=/c POWERCFG /CHANGE %SCHEME% /hibernate-timeout-dc 60
Flags=00001010
end
item: Display Message
Title=PowerCFG
Text=Your computer is set.
Flags=00100100
end
item: Exit Installation
end

[font="courier new"]
Posted by: Bobo 15 years ago
Orange Belt
0
Not a solution but a tip for simplify the script, you don't need to resolve the name of the scheme use this instead:

[font="courier new"]Command Line=/c POWERCFG /CHANGE %SCHEME_NB% /numerical /hibernate-timeout-dc 60
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ