Jump to content
Sign in to follow this  
Guest kauphy

setting controlpanel Powercfg key

Recommended Posts

Guest kauphy


I was trying to script my windowsXP system settings. Got everything working except settings for "Power Options Properties". Need to set,

1.)Power Schemes to "Always on"

2.)Turn of monitor to "Never"

3.)Turn of hard disks to "Never"

Got the first one working by using

RegWrite("HKEY_CURRENT_USER\Control Panel\PowerCfg", "CurrentPowerPolicy", "REG_SZ", "6")

For the other two I have copied the reg-key from regedit and tried to use :

RegWrite("HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\6", "Policies", "REG_BINARY", "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,0



But for somereason, it is not setting the desired properties. I tried "exporting the registry settings->changed the properties->and then run the exported reg key manually" this works, but getting the same done by autoit doesnt.

Any idea why its happening or any error that I am making.



Share this post

Link to post
Share on other sites

RegWrite('HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\6', 'Policies', 'REG_BINARY', _

Don't use the "quot;hex:" string. You are already using the correct method of entry, by using the REG_BINARY parameter. Then remove the comma's from the hex string. Then it will work as expected.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...