Sunday, October 5, 2008

Restoring hibernation in Windows Vista after disk cleanup

This is rather interesting post, yeah I know excuse me here as its is yet another non cisco post ..but still a good one.

On windows vista, this is what happened ..I decided to run the Windows Cleanup tool, which enables you to clear your disk of unnecessary files. Main reason was that I was running out of space on my C:\ partition. So I only selected my C:\ drive to be cleaned up. After selecting the Disk Cleanup tool this dialog poped up:



Selecting the C:\ drive to be cleaned up ..and following certain other screens, this is what I would be able to free.



Which is all good uptill here. Infact was glad that I would be able to give myself some room on c: drive for time being. So I went ahead and clicked ok, and yeah I had some free space.

Latter in day I realised that that I was no longer able to hibernate my laptop, I mean all I did was just cleared up some space on c: drive ya. It latter dinged me that perhaps since I had checked the "hibernation file cleaner" option in the above cleanup process, that now hibernation was no longer and option, pitty isn't it. :)

Anyways after spending some time on the Microsoft site I figured how to get it back, and here are the steps:

1. Click Start , click All Programs, and then click Accessories.

2. Right-click Command Prompt, click Run as administrator, type powercfg -h on, and then press ENTER.


The command line tool powercfg.exe enables users to control the power settings on the system. An overview of all parameters that can be passed to the tool can be found by running the command "C:\Windows\system32>powercfg /?" from the command prompt.

For the hibernation we need the following:

-HIBERNATE, -H [ON|OFF]
Enables-Disables the hibernate feature. Hibernate timeout is not
supported on all systems.

Usage: POWERCFG -H [ON|OFF]

After running the command above with the hibernation parameter "powercfg -h on" the problem is solved and I can again hibernate my Windows Vista system. Btw, dont forget to bring up the command prompt as an administrator, else you will be slapped with yet another error. :D

HTH!