Hibernate PC Via Batch File or Run Command

by on September 6th, 2009

Batch files allow MS-DOS and Microsoft Windows users to create a lists of commands to run in sequence, once the batch file has been executed. If you have trouble hibernating PC and tired of process of clicks involved in it then you can simply write a batch file to do so.

Hibernation or Standby from Run Menu

To put the system in to hibernation, follow these steps:

Hibernate from Run Command

Make sure that the system is hibernation enabled. To confirm that,

  • Click the Start button
  • Go to Run menu and type in Powercfg.cpl and click OK
  • In the Power Options Properties click Hibernate tab and make sure that Enable hibernation option is checked
  • Click OK/Apply

Click the Start button, go to Run menu and type in
%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState
Click OK

As long as Hibernation is enabled in Power Options, the above command in a batch file will cause the computer to hibernate.

Creating a Bath File for Hibernation
  • Open Notepad
  • Go to File > Save As… and chose a file name
  • Choose your desktop as the location to save, for now. Don’t click Save just yet
  • Click on the dropdown menu next to “File name”. Select “All files” instead of Text Document”
  • Add .bat to the end of your file name before you save. For example, you would type hibernate.bat
  • Click on Save
  • Enter your command for hibernating
  • Save the file
  • Run the file by double clicking the file on your desktop
Stand By from Run Command

Make sure that the system is hibernation disabled.

  • Click the Start button
  • Go to Run menu and type in
  • %windir%\System32\rundll32.exe powrprof.dll,SetSuspendState
  • Click OK

Also read How to Display Hibernate Option in Turn Off Computer Box


Share