Google Answers Logo
View Question
 
Q: Switching Power Options Advanced Tab settings from shortcuts on desktop? ( No Answer,   1 Comment )
Question  
Subject: Switching Power Options Advanced Tab settings from shortcuts on desktop?
Category: Computers > Operating Systems
Asked by: ericrichner-ga
List Price: $2.00
Posted: 11 Mar 2006 13:04 PST
Expires: 10 Apr 2006 14:04 PDT
Question ID: 706167
My Goal: to have two shortcuts on my win xp laptop, one would change
the "when I close the lid" option to "do nothing" - the other would
set it to "hibernate". I would then be able to click the shortcut and
close the cover and have it perform the option. Right now I have a
shortcut to the "power option control panel" and I open that and go to
the Advanced tab and set the option manually, then close the cover.

How would I accomplish this?

Request for Question Clarification by hummer-ga on 11 Mar 2006 13:52 PST
Hi ericrichner,

How would this be?

If you turn on "Fast User Switching", the Shut Down menu will have the
options to Stand By, Turn Off, or Restart.
For Hibernation, hold down the Shift key and the Stand By button
should switch to Hibernate.

Turn On Fast User Switching
http://www.microsoft.com/windowsxp/using/accessibility/fastuserswitching.mspx

Regards,
hummer

Clarification of Question by ericrichner-ga on 11 Mar 2006 19:58 PST
See sometimes when I choose to close my laptop lid, I do not want it
to Hibernate (which is the setting it is on), rather I'd like it to
"Do Nothing"; vice versa.

I want to know how I would find a program (or the code for it) that
can enable me to have 2 icons on my desktop, click on one called
"hibernate" would automatically set the Advanced Power Option for what
happens when you close the lid to "Hibernate", the other would set the
option to "Do Nothing".

I want it so I can skip the step of having to ever go into my Power Options Dialog.

Request for Question Clarification by hummer-ga on 11 Mar 2006 20:15 PST
Hi ericrichner,

If noone comes forward with exactly what you want, what I suggested
may be an improvement for you. What you want to accomplish will be
able to be done via the Shut Down Menu (Start / Shutdown) by toggling
between Hibernate and Standby.

Regards,
hummer

Clarification of Question by ericrichner-ga on 11 Mar 2006 22:35 PST
Thanks for the advice, but I am specifically looking for a shortcut
(also so I can setup a hotkey via the properties of the icon/shortcut
on the desktop)
Answer  
There is no answer at this time.

Comments  
Subject: Re: Switching Power Options Advanced Tab settings from shortcuts on desktop?
From: bencreswick-ga on 04 Apr 2006 02:14 PDT
 
Hi ericrichner,
I have had the similar goal for a while:
switching between: 
 "when I close the lid - Do nothing"
 "when I close the Lid - Standby"

Because you ask in your post for "a program (or the code for it)", I
will assume that you can handle exporting a registry key and
creating/editing a batch file. And that you can adapt my method to
include your preference for Hibernate. Let me know if I am unclear on
any steps.

My Steps:

Open the "Power Options Properties" (Start\Run\powercfg.cpl)
Go to the "Advanced" tab.
Set "When I close the lid of my portable computer" to "Do Nothing"
Click Apply

Using Regedit, export the 
[HKEY_CURRENT_USER\Control Panel\PowerCfg\GlobalPowerPolicy]
Key into "DoNothingMode.reg":

Go back to "Power Options Properties" dialogue
Set "When I close the lid of my portable computer" to "Stand by"
Click Apply

Using Regedit, export the same key into "StandByMode.reg"

Repeat for "Hibernate"

In the end you should have a couple of .reg files.
  DoNothingMode.reg
  StandbyMode.reg
  HibernateMode.reg

All you need now is to create a batch file for each of those .reg files as follows:

DoNothingMode.bat:
  regedit /s "DoNothingMode.reg"
  rundll32.exe powrprof.dll,LoadCurrentPwrScheme

StandbyMode.bat:
  regedit /s "StandbyMode.reg"
  rundll32.exe powrprof.dll,LoadCurrentPwrScheme

Hibernate.bat:
  You can probably take it from here ;-)

So, if you compare your three .reg files, there is very little
difference, maybe 2 or 3 bytes, I haven't investigated too deeply into
the structure of this registry key.

Just merging the registry file isn't enough though
The rundll32 step in the batch file turn out to be the magic trick
that activates the changed that you make to the registry.

So, hope it works for you, also as this is my first comment of Google
Answers, I hope my formatting doesn't go crappy.

Cheers,
Ben.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy