Solved

Registry Imports for Power

Posted on 2007-03-23
8
5,900 Views
Last Modified: 2013-11-30
So I'm trying to create a simple registry key to manually go around to a few Desktops and just run a quick batchfile and implement the registry settings for Power Schemes.

I will do this in steps to show you what I've done:

1.  Turn on and Logon To Test Computer.  I have local admin rights.
2.  Set Power Scheme I want everyone to have, which is NEVER on everything.
3.  Export [HKEY_CURRENT_USER\Control Panel\PowerCfg] to local desktop.
4.  Set Power Scheme to something other than never on default and non-default schemes.  In the default scheme "St. Andrew's Power", I changed the default to 15 min for turn off harddisk.
5.  Apply and OK to setting changes.
6.  Click on saved registry key and import back into same computer.
7.  Check settings again and all non-default settings have been changed back to "Never" but the current default scheme which is "St. Andrew's Power" is still set to turn off the harddisk after 15min.

Basically the problem seems to be that no matter what the default settings are I cannot change those settings.  Even if I create a key that says to make the default power scheme "Always On" which by default is set to NEVER and import that key, it takes whatever the default settings are and forces them down on that scheme.

Here is the registry key that I tried setting the default to "Always On":

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\PowerCfg]
"CurrentPowerPolicy"="3"
Here is the big reg key I tried to use... all settings should be NEVER:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\PowerCfg]
"CurrentPowerPolicy"="0"

[HKEY_CURRENT_USER\Control Panel\PowerCfg\GlobalPowerPolicy]
"Policies"=hex:01,00,00,00,00,00,00,00,03,00,00,00,10,00,00,00,00,00,00,00,03,\
  00,00,00,10,00,00,00,02,00,00,00,03,00,00,00,00,00,00,00,02,00,00,00,03,00,\
  00,00,00,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,00,00,\
  00,00,00,00,00,01,00,00,00,03,00,00,00,02,00,00,00,04,00,00,c0,01,00,00,00,\
  04,00,00,00,01,00,00,00,0a,00,00,00,00,00,00,00,03,00,00,00,01,00,01,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,00,\
  00,14,00,00,00

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies]

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\0]
"Name"="St. Andrew's Power"
"Description"="This scheme is suited to most home or desktop computers that are left plugged in all the time."
"Policies"=hex:01,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,84,03,00,00,32,32,03,02,04,00,00,00,04,00,\
  00,00,00,00,3d,77,2e,f2,07,00,00,00,00,00,00,00,00,00,00,00,00,00,2c,01,00,\
  00,00,00,64,64,64,64,91,7c

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\1]
"Name"="Portable/Laptop"
"Description"="This scheme is designed for extended battery life for portable computers on the road."
"Policies"=hex:01,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,2c,01,00,00,32,32,03,03,04,00,00,00,04,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,2c,01,00,00,00,00,00,00,2c,01,00,\
  00,01,01,64,50,64,64,00,00

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\2]
"Name"="Presentation"
"Description"="This scheme keeps the monitor on for doing presentations."
"Policies"=hex:01,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,84,03,00,00,32,32,03,02,04,00,00,00,04,00,\
  00,00,00,00,3d,77,2e,f2,07,00,00,00,00,00,00,00,00,00,00,00,00,00,2c,01,00,\
  00,00,00,64,64,64,64,91,7c

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\3]
"Name"="Always On"
"Description"="This scheme keeps the computer running so that it can be accessed from the network.  Use this scheme if you do not have network wakeup hardware."
"Policies"=hex:01,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,32,32,00,00,04,00,00,00,04,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,84,03,00,00,00,00,00,00,08,07,00,\
  00,00,01,64,64,64,64,00,00

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\4]
"Name"="Minimal Power Management"
"Description"="This scheme keeps the computer on and optimizes it for high performance."
"Policies"=hex:01,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,32,32,03,03,04,00,00,00,04,00,\
  00,00,00,00,3d,77,2e,f2,07,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,64,64,64,64,91,7c

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\5]
"Name"="Max Battery"
"Description"="This scheme is extremely aggressive for saving power."
"Policies"=hex:01,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,05,\
  00,00,00,00,00,00,00,00,00,00,00,78,00,00,00,32,32,03,02,04,00,00,00,04,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,3c,00,00,00,00,00,00,00,b4,00,00,\
  00,01,01,64,32,64,64,00,00

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\6]
"Policies"=hex:01,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,32,32,03,03,04,00,00,00,04,00,\
  00,00,00,00,3d,77,2e,f2,07,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,64,64,64,64,91,7c
0
Comment
Question by:flashtek1899
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 1

Expert Comment

by:the_darke
ID: 18782433
Have you tried exporting the same keys from the HKEY_Users\Control Panel\PowerCfg? Current_User is based on the current profile logged in, users is for all accounts (and is where the Current_User subtree is built from)?
0
 

Author Comment

by:flashtek1899
ID: 18782486
I had tried but forgot to document it.

That actually is even worse.  It doesn't change anything.  I even rebooted for good measure.
0
 
LVL 1

Accepted Solution

by:
the_darke earned 500 total points
ID: 18782633
Just had a little think- when you select the power profile you want to push out, log off and back on (forcing the current_user key to reload). once done the export the contents of the it. Essentially, if memory serves me, the GlobalPowerPolicy is the applied policy and it does not update until log off when the key is changed. So if you set it up, log off, log back on, export the registry keys, change the policy, log off and back on, import the reg file, and then log off and back on AGAIN, it should have it applied.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:flashtek1899
ID: 18782701
Good thought... same problems.
0
 
LVL 1

Expert Comment

by:Hanntho
ID: 23834239
Hi Flashtek1899,

You accepted an answer for this question but then said "Good thought... same problems." Do you mean the accepted answer didn't work? I'm struggling with a similar problem.
0
 

Author Comment

by:flashtek1899
ID: 23835418
We eventually went with Running the following in the logon script.  Basically just shelled out to run a command box.

powercfg.exe /setactive "Always On"
powercfg.exe /hibernate off
powercfg.exe /change "Always On" /monitor-timeout-ac 0
powercfg.exe /change "Always On" /disk-timeout-ac 0
powercfg.exe /change "Always On" /standby-timeout-ac 0

Hope that at least helps you get going in the correct direction.
0
 
LVL 1

Expert Comment

by:Hanntho
ID: 23888251
OK, thanks for the tip. Will check out the possibilities with powercfg.exe.
0
 

Expert Comment

by:eporteni
ID: 28571509
The login script definitely was the way to go... pushed it out with Group Policies... worked great!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
I wrote an article (http://www.experts-exchange.com/articles/2245/Anti-rootkit-software.html) some time ago with a reference to nLite  (http://www.nliteos.com/)slipstreaming software.  I recently changed that link to point to NTLite (https://www.ntl…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question