Help - Search - Members - Calendar
Full Version: Hibernate via bat file???
Gladiator Security Forum > Microsoft Corner > Help & Support and information: MS Windows
stidyup
I want to be able to send my PC into hibernate via a bat file. Has anybody any idea if this is possible and what the command to do it is? So far my searches have revealed nothing.

You can shutdown your PC via the command prompt but can you send it into hibernation via the command prompt?
stidyup
Had this suggest by one of my IT colleagues, but surely this can be done via XP without the need for additional software.

Smart Shutdown

Smart Shutdown Bat file command
stidyup
From what I've found it doesn't appear the MS Shutdown.exe supports a switch which will put the PC into hibernate, unless it's a secret switch somewhere?

However I'm managed to find this which doesn't need installing:

AMP WinOFF

Will work from the command line with the -hibernate option.

If MS XP has no way of doing it then I'll use this.

Another free software which will do it is this but it needs installing:

Quick Shutdown
Hunter
This is all i found out so far..I do know they turn it off during a an MS OS upgrade process like when they did SP2 to make sure it did not come on..


SystemEvents.PowerModeChanged Event
http://msdn.microsoft.com/library/default....hangedtopic.asp


Slow resume from hibernate (winXPsp2)
http://forum.skype.com/viewtopic.php?t=148...tandby&start=30

12Ghosts ShutDown
http://www.12ghosts.com/ghosts/shutdown.htm


How can I customize a new Windows XP installation?
this link has some nice tips


http://www.petri.co.il/customize_a_new_xp_installation.htm

Add a Command Prompt option to the default Explorer right click context menu

Add a shortcut to Command Prompt to the Desktop and to the Quick Launch toolbar


Get rid of the Hibernation support
XP auto-enables hibernation support on your machine. Although this might be a good thing on a portable computer, you do NOT need it on a desktop machine. Furthermore, a very large file called HIBERFIL will take a lot of space on your system partition (as big as your installed RAM), and we really don't need it to be there if we don't require the hibernation support.




To get rid of the hibernation support follow the next steps:

Right-click an empty space on your desktop. Choose Properties.

Go to the Screen Saver tab and click the Power button.



Un-check the Enable Hibernation check-box.



Hiberfil - Remove Hibernation File

If you do not use hibernation, make sure you do not have it enabled, which reserves disk space equal to your RAM. If you have a hidden file on the root directory of your C-drive called hiberfil.sys, hibernation is enabled. To remove that file, go to Control Panel, select Performance and Maintenance, Power Options, Hibernate tab, and uncheck the Enable hibernation box.

Hibernate

To hibernate manually, select Start, Turn Off Computer, then click the Hibernate button. To set your system to hibernate after it has been idle for a certain amount of time, select Power Options inside the Control Panel (in Category view, select Performance and Maintenance, then select Power Options). On the Power Schemes tab, choose a time next to "System hibernates," then click OK.

Hibernate - Differences Between Hibernate and Standby

Hibernation

Hibernation, which reduces the start time, saves the complete state of the computer and turns off the power. When you resume from hibernation the BIOS performs the typical Power On Self Test (POST), and then reads the hibernation file, Hiberfil.sys, to restore the state of the computer. Everything that was running when you put the computer in hibernation is restored.



Click Ok all the way out.

Notice that the HIBERFIL is gone from the system partition.



Hibernate Setting Missing

Click on the start button and select turn off computer. Then hold down the shift key and the hibernate button will be shown. Click it and your computer will enter into hibernation.

Cannot Shut Down, Restart, Log Off, Stand By, or Hibernate
Troubleshooting Hibernate & Standby Issues for Windows XP
Computer Does Not Resume When You Press a Key on Your USB Keyboard
Returning from Hibernation Sets the Inactivity Timer to Five Minutes

Tip: When you try to put your computer into Hibernate or Suspend mode while the system is writing data to a compact
disc (CD), the computer may not enter Hibernate or Suspend mode. You may receive the following error message
(or a similar one):

The device driver for the '%device name%' device is preventing the machine from entering hibernation/suspend. Please close all applications and try again. If the problem persists, you may need to update this driver.

You receive neither an informational message that the system is writing to a CD nor an error message that offers you the choice of stopping the CD write process or waiting until the process is complete.

This behavior occurs because you cannot put a computer into Hibernate or Suspend mode while the system is writing to a CD. To work around this behavior, wait until the CD write operation is complete before you try to put the computer into Hibernate or Suspend mode.

Because the computer has already started to enter Hibernate or Suspend mode, some devices may already be turned off. For example, a USB mouse or scanner may be offline until you complete the Hibernate or Suspend process.


Cannot Shut Down, Restart, Log Off, Stand By, or Hibernate When Computer Is Docked

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


Standby & Hibernate Issues in Windows XP
http://www.kellys-korner-xp.com/xp_standby.htm

Returning from Hibernation Sets the Inactivity Timer to Five Minutes

http://support.microsoft.com/default.aspx?...b;EN-US;Q318355


Hibernate mode:
Under Windows:


One last thing: you can go into "hibernate" mode, which saves the RAM to the hard disk, and means that you can re-start the machine much quicker than usual. You need to

select "Turn off computer" from the "Start" menu
then hold down the Shift key (the "Stand-by" button changes to "Hibernate") and select the "Hibernate" button.
Note that the "Stand-by" mode turns the screen off, but keeps power to the rest of the laptop - and hence uses battery power...
toadbee
Hi Stidy Up -

Try this, I haven't ahah.gif

"RUNDLL32.EXE PowrProf.dll,SetSuspendState"

hello.gif
stidyup
Thanks toadbee

That worked perfectly :cake: beer.gif
Hunter
here are someMore rundll32.exe links

If you have trouble getting a link to work, then try putting the Windows System path in front of it, such as: C:\WINDOWS\System32\



http://www.dx21.com/SCRIPTING/RUNDLL32/REF...E.ASP?ISF=0&P=A
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.