Registry Imports for Power

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
flashtek1899Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

the_darkeCommented:
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
flashtek1899Author Commented:
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
the_darkeCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

flashtek1899Author Commented:
Good thought... same problems.
0
HannthoCommented:
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
flashtek1899Author Commented:
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
HannthoCommented:
OK, thanks for the tip. Will check out the possibilities with powercfg.exe.
0
eporteniCommented:
The login script definitely was the way to go... pushed it out with Group Policies... worked great!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Utilities

From novice to tech pro — start learning today.