Mar 27 2008

Hibernating A PC Automatically

Category: PersonalChrisM @ 1:10 pm

OK, so far today we have had two power cuts. The first woke me up, as the UPS (uninterruptible power supply) sounds an internal alarm when the electricity is cut. However, when I’m not around, or deeper in a sleep, the PC is automatically shutdown to prevent data loss or damage to sensitive electrical equipment that could result from the supply being simply cut off.
However, what I would prefer is for the computer to hibernate. This means the PC is shut down to the point that it does not require any further electricity, but all the contents of the RAM is stored on the hard drive. Theoretically, this should mean that when the power is restored, I can turn on the PC, and have the same programs, webpages etc. all opened up as they were prior to the power cut. Anyway, there is no -h switch for the command line shutdown command, so I had to do a little searching. If I enter %windir%\system32\rundll32.exe powrprof.dll,SetSuspendState Hibernate into the program to be run after sixty seconds of no power, in the UPS configuration utility, the theory is that no data will be lost, and all should be fine. There are problems with some programs not being compatible with hibernation mode, but I’ll deal with those as they arise.
If you need more info, or specific guidance, leave me a message…

Tags: , ,

Comments are closed.