[wpkg-users] Power preferences
Paul McGrath
J.P.McGrath at leeds.ac.uk
Mon Mar 16 17:47:21 CET 2009
Anders,
I tried that a long time ago as well and discovered exactly what Tomasz has said. If you don't have an AD controller then you have to set the properties at user level. The easiest thing to do is to take a snapshot of the registry before changing the settings you want and then change the power settings then compare the snapshots. You will end up with something like this. Then stick it in a logon script that merges into the user reg.
Paul
[HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies]
[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,02,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,00,00,00,00,00,00,00,00,b0,04,00,00,2c,01,00,00,00,00,00,00,58,02,00,\
00,01,01,64,50,64,64,00,00
[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,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,\
00,00,00,00,00,00,00,b0,04,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,84,03,00,00,2c,01,00,00,08,07,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,02,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,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,2c,01,00,\
00,01,01,50,50,64,64,00,00
[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,02,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,00,00,00,00,32,32,00,00,04,00,00,00,04,00,\
00,00,00,00,00,00,00,00,00,00,b0,04,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,02,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,03,03,04,00,00,00,04,00,\
00,00,00,00,00,00,00,00,00,00,84,03,00,00,2c,01,00,00,00,00,00,00,84,03,00,\
00,00,01,64,64,64,64,00,00
[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,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,05,\
00,00,00,00,00,00,00,b0,04,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,84,03,00,00,3c,00,00,00,00,00,00,00,b4,00,00,\
00,01,01,64,32,64,64,00,00
-----Original Message-----
From: wpkg-users-bounces at lists.wpkg.org [mailto:wpkg-users-bounces at lists.wpkg.org] On Behalf Of Anders Nilsson
Sent: 16 March 2009 16:32
To: wpkg-users at lists.wpkg.org
Subject: [wpkg-users] Power preferences
I run the wpkg.js client from Windows XP startup script, which means
wpkg runs as the system user (I think), and try to install the following
self-made package:
<package id="powerproperties"
name="Power properties for monitor and standby"
revision="3"
reboot="false"
priority="10">
<install cmd='powercfg /S "Home/Office Desk"' />
<install cmd='powercfg /X "Home/Office Desk" /monitor-timeout-ac 15' />
<install cmd='powercfg /X "Home/Office Desk" /standby-timeout-ac 240' />
<upgrade cmd='powercfg /S "Home/Office Desk"' />
<upgrade cmd='powercfg /X "Home/Office Desk" /monitor-timeout-ac 15' />
<upgrade cmd='powercfg /X "Home/Office Desk" /standby-timeout-ac 240' />
</package>
The problem is that the settings don't stick, that is nothing concerning
power properties as changed. The client wpkg log file thinks everything
is OK and that the package is successfully installed (or upgraded when
applicable).
Running the very same commands logged in as Administrator things work
just as expected. When nobody is logged on the monitor shuts down after
15 minutes and the system goes to standby in 4 hours.
As far as I can see these power property settings is not a user
preference, or is that my problem here?
/Anders
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
wpkg-users at lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users
More information about the wpkg-users
mailing list