10 January 2012

How to Create a Hibernate Shortcut in Windows



When you shut down your system in Hibernate mode, the computer powering down and shut down while retaining its state. The computer saves the contents of its random access memory or RAM to a portion of hard disk. Hibernating is like a regular shutdown and no electrical power is used when the system is in hibernate state. But when you turn on the PC again, the system retrieves its previous state with all applications that were opened when you shutdown the system.

The Windows uses Hiberfil.sys hidden system file that's located in the root folder of C: drive (or the drive where the operating system is installed). This file saved by Windows Kernel Power Manager during installation of Windows. The size of this file is approximately equal to your system random access memory (RAM).

In this post, I plan to introduce two methods to hibernate your PC faster by making a shortcut for hibernating. One use of this shortcut is to set up a time for your PC to go into Hibernate mode. For this purpose you can use Windows Task Scheduler. For access Task Scheduler, in Windows XP from the Control Panel, go to Task Scheduler and in Windows 7/Vista, enter Task Scheduler in Start menu search bar and hit the Enter.

You can use this shortcut in download manager applications like Internet Download Manager (IDM). You may be familiar with Scheduler in IDM. With this feature, you are able to define a schedule to set a time for your download and after the download finished the IDM will execute the program or task that you have defined for it (like turning off the computer). You can define your hibernate shortcut in this section, so after the download, the IDM will run this shortcut and your system will go to hibernate state. In IDM Schedule window brows this shortcut in Open the following file when done and click on Apply.


Before anything, you should first make sure the Hibernate feature is enabled in Windows. To activate Hibernate:

In Windows XP from the Start menu go to Control Panel>Power Options and inside the Hibernate tab select Enable Hibernation.

In Windows 7/Vista, go to Start and write CMD, then right-click on CMD and choose Run as administrator. In the Command Prompt window type

Powercfg /hibernate on

There is a space between powercfg and /hibernate on.

Now I start with making a shortcut for Hibernating in Windows:

First method
Step 1
Open the Notepad and copy and paste the code below inside it:



Step 2
Save the file with extension .bat and your desired name, for example Hibernate.bat.


Step 3
Double-click on this file and you will see that a small window will appear and after 10 seconds windows will automatically Hibernate. This order is set to 10 seconds so if you change your mind, then you can cancel the operation simply by closing the window. You can change the time by changing the number 10000 in milliseconds (10 seconds is equal to 10000 msec).



Second Method
Step 1
Right-click on an empty space on desktop or any other folder and select New>Shortcut and click on Next button.


Step 2
In next window copy and paste the code below and select Next.



Step 3
Choose a name for your shortcut like Hibernate and click on Finish.


Step 4
Now if you double-click on this shortcut, the Windows will Hibernate immediately.