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
Has anybody run into this and do you have a fix?
Thanks
Kris
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
bkelly
15 years ago
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
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
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"]
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
14 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.