Solved

Registry Imports for Power

Posted on 2007-03-23
8
5,864 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
 

Author Comment

by:flashtek1899
ID: 18782701
Good thought... same problems.
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now