.comment-link {margin-left:.6em;}

IntTech

Saturday, June 26, 2010

Windows 7 Undock and Hibernate

New job has me using Windows 7 on a laptop. It seems less stable than Windows 2000. It has an undock feature on the "shutdown" menu. The problem is that 90% of the time I undock, I also want the laptop to hibernate. The other 10% of the time I want to undock to carry my laptop to a meeting. There is no "undock and hibernate" option separate from the plan undock on the menu. To do it properly you would have to undock, pop open the laptop and select hibernate. A real pain...

So thinking like a unix user, I figured there must be a way to do this on the command line. And here we go a short bat file to undock and hibernate. Copy the following lines and put them in a file. I called it gohome.bat.

: This Undocks
C:\Windows\System32\rundll32 cfgmgr32.dll,CM_Request_Eject_PC
:: Then we Hibernate
C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0
Hibernation has to be enabled for the last line to hibernate. Now I just double click the bat file on my desk top, and I'm off.

Bookmark and Share

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home


Google