Link to home
Start Free TrialLog in
Avatar of Chris Miller
Chris MillerFlag for United States of America

asked on

Remotly change power options

NT4.0 domain with XP pro clients

How can I remotly change power options without using remote desktop

I want to set "Turn off hard disks " to " after 1 hour "
Avatar of Joseph O'Loughlin
Joseph O'Loughlin
Flag of Ireland image

Hi CMILLER,

Use RegMon from Sysinternals.com to see what key is changed when you toggle the setting in the control panel.
Navigate to that key in regedit and export it creating a .reg file.
Add a call to that .reg file to your login script.

usual disclaimers apply
Avatar of Chris Miller

ASKER

Neat tool

I cant tell which one though
It is like drinking from a firehose.  You need to set up filters for explorer and other open programs.  I minimise everything except the applet and regmon and tile vertically then clear the log and apply the change.
Checkout
HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\GlobalPowerPolicy\Policies
HKLM\System\Currentcontrolset\control\Session Manager\Power
HKCU\Control Panel\PowerCfg
If you open the three files in notepad you can combine them into one.
Are you saying its all three
ASKER CERTIFIED SOLUTION
Avatar of Joseph O'Loughlin
Joseph O'Loughlin
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It appears to change this, so I saved out a never.reg and a 1hour.reg, I can see some numbers have changes.

So, I left it set to never in the GUI Control Panel\Power options, exe'd the 1hour.reg but it did not change anything in the,
GUI Control Panel\Power options, even after a reboot.

It must change more than that one key???

************************************************************

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\0]
"Name"="Home/Office Desk"
"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,00,\
  00,00,00,00,00,00,00,00,00,00,00,2c,01,00,00,32,32,00,03,04,00,00,00,04,00,\
  00,00,01,00,00,00,14,f2,06,00,b0,04,00,00,2c,01,00,00,20,1c,00,00,58,02,00,\
  00,00,00,64,64,64,64,95,71
In regmon filter for only the rundll32 process and look at the setvalue entries in the request column - yes multiple changes are made.
No Change for me in any of these:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\ProcessorPolicies\0

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\PowerPolicies\0

[HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\GlobalPowerPolicy
It's the early hours here so I won't be perscriptive.  Goodnight.
I ran it twice, once each while changing values, here are the matches from both, that it changed.

HKCU\Control Panel\PowerCfg\PowerPolicies\0\Policies      
HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\PowerPolicies\0\Policies      
HKCU\Control Panel\PowerCfg\GlobalPowerPolicy\Policies      
HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\GlobalPowerPolicy\Policies      
HKLM\SYSTEM\CURRENTCONTROLSET\Control\Session Manager\Power\AcPolicy      
HKLM\SYSTEM\CURRENTCONTROLSET\Control\Session Manager\Power\DcPolicy      
HKCU\Control Panel\PowerCfg\CurrentPowerPolicy

******************************************************

Whats weird is that when you change this one from one value to another, it does not change anything
HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\GlobalPowerPolicy\Policies

******************************************************
I will copy out each key and add it to a main one for each value, add see what happens

Can you put all keys in one file: Value-Never.reg and Value1Hour.reg : then I could run one or the other