Solved

Registry Imports for Power

Posted on 2007-03-23
8
5,877 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

943 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

16 Experts available now in Live!

Get 1:1 Help Now