Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Registry Imports for Power

Posted on 2007-03-23
8
Medium Priority
?
5,971 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1500 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
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
I originally wrote this article to compare SARDU and YUMI, but have now added Easy2Boot, since that is the one I currently use and find the easiest to create and alter.
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

722 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