We help IT Professionals succeed at work.

How can I force Microsoft Windows 7 from going into hibernation?

StMike38
StMike38 asked
on
My Windows 7 Professional machine goes into hibernation when I am away from the device for over 40 minutes. This interrupts batch programs that I run -- some of them requiring six hours.

Microsoft recommends as administrator giving the DOS command "powercfg.exe /hibernate off" in the root directory of the volume containing Windows. Very nice, but it doesn't work.

How can I get the machine to stay awake until it finishes intense batch jobs?
Comment
Watch Question

JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018
Commented:
See if the Microsoft FixIt for hibernation helps you.

http://support.microsoft.com/kb/920730

You can also try deleting the hidden file hiberfil.sys in the root directory.

Try the FixIt first.
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
You can also lengthen the time to hibernation to 3 hours or more.
Technology and Business Process Advisor
Most Valuable Expert 2013
Commented:
Set Sleep and Hibernation times to 0.  That should disable them.  These settings are in the Power Options Control Panel.  Click on the hyperlink to "Change plan settings" then click on Change advanced power settings.
Distinguished Expert 2018

Commented:
You must run cmd as admin.

Turn off hibernation  
powercfg -h off
Set standby to infinite (0) according to power source
powercfg -change -standby-timeout-ac 0
powercfg -change -standby-timeout-dc 0

This gives the same result as suggestion from Lee W. I guess that in your case, after you issued turning off hibernation (it works :) computer was still going to sleep.
Most Valuable Expert 2015

Commented:
You say "powercfg.exe /hibernate off" doesn't work. In what way doesn't it work? Do you get any error message when executing that command? Might there be a policy set that doesn't allow things like that to be changed?

Author

Commented:
Thanks!
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
@StMike38 - You are very welcome and I was happy to help.