PDA

View Full Version : Power Settings



jimbochapy
11-02-2006, 07:04 AM
I want to make sure all users of a machine have the same power settings, without them being able to access these controls themselves. I created a Power Settings profile and exported these registry settings, to be merged on logon. This merge correctly changes the name of the Settings scheme, but if the settings themselves have been changed by the Admin, it keeps these settings. I have even completely deleted the entire Power Settings tree and merged the correctly set one, but the PC some how remembers the last set settings! Any ideas would be greatly appretiated.

jdharm
11-02-2006, 07:52 AM
I suspect that Explorer will have to reload after making a change to the power settings via the registry. Maybe the script that sets the proper settings can then kill and restart the Explorer process?

Josh

Yet another site soon to be neglected:<font color=green>
<a target="_blank" href=http://www.zachmax.com>www.zachmax.com</a></font color=green>

jimbochapy
11-02-2006, 07:57 AM
The wrong settings seem to be remembered even after a restart, so I guess this would have restarted Explorer?

jdharm
11-02-2006, 08:03 AM
Hmm...yeah it would.

Could you post the details of your methodology? Maybe there's something in there responsible for the failure we could tweak.

Josh

Yet another site soon to be neglected:<font color=green>
<a target="_blank" href=http://www.zachmax.com>www.zachmax.com</a></font color=green>

jimbochapy
11-02-2006, 08:34 AM
I set the Power Scheme up as I want it, then name it P1. I then export the registry file HKEY_CURRENT_USER\Control Panel\PowerCfg. My Logon script merges this file on start up. When I go to the power settings, the scheme is named P1 and all the settings are ok. However if I change these settings, either individually or to another scheme, when I run the Logon file and then reopen the Power Settings Screen, the Scheme name is P1, but the settings will remain as I last left them.

jdharm
11-04-2006, 08:12 PM
...However if I change these settings, either individually or to another scheme, when I run the Logon file XX and then reopen the Power Settings Screen, the Scheme name is P1, but the settings will remain as I last left them.


I ran your process exactly as you described (except applying the reg file at logon) and observed the same problem you are having. As I suspected when suggesting that you do an Explorer stop/start for the settings to take effect, changing them in the registry is not enough to change them in the current user environment. Unfortunately, the solution required more than an Explorer stop/start...I had to log off completely at the point in your process I have marked with and XX (sans applying the reg file). Then the reg file settings I loaded just prior to the log off/on took effect and the manually changed settings were gone.

Something in Windows will have to be restarted for the settings in the registry to be reloaded. It doesn't matter that they are correct in the registry. The settings reported in the power control applet reflect what has been loaded into the user environment, not what is currently in the registry.

I don't know enough about the core processes of Windows to know what to suggest what needs a restart or reload. If an Explorer reload won't do it, I'm at a loss.

Josh

Yet another site soon to be neglected:<font color=green>
<a target="_blank" href=http://www.zachmax.com>www.zachmax.com</a></font color=green>

jimbochapy
11-06-2006, 05:22 AM
You have solved my problem! When I read your last post I thought, that's strange, when I change the settings, even if I completely shutdown the PC, the manually changed settings are still there. After some faffing about I realised that the difference was that your method applied the reg merge after the logon. This it seems makes the difference. I have removed the Logon script and replaced it with a Logoff script. Now if an administrator messes with the settings during the session it is reset and the users have no access anyway.
It seems that appying the new settings during Logon has no effect, even if the PC is completely shutdown. Where as appling the reg merge during a session or on shutdown, changes them!
I'd still like to one day find out how to change them with out logging off!
Thanks for your help Josh.

James

jdharm
11-06-2006, 09:33 AM
Umm...I lost track of what's going on.

But if you're happy, I'm happy.

/images/forums/icons/smile.gif

Josh

Yet another site soon to be neglected:<font color=green>
<a target="_blank" href=http://www.zachmax.com>www.zachmax.com</a></font color=green>