Guest kauphy Posted April 6, 2005 Posted April 6, 2005 Hi, 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,00,00,2c,01,00,00,32,32,00,03,02,00,00,00,02,00,00,00,00,00,3d,77,2e,f2,07,00,00,00,00,00,2c,01,00,00,00,00,00,00,58,02,00,00,01,01,64,64,64,64,91,7c")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.thanks,purna.
MHz Posted April 7, 2005 Posted April 7, 2005 RegWrite('HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\6', 'Policies', 'REG_BINARY', _ '0100000000000000010000000000000002000000000000000000_ 0000000000002c01000032320003020000000200000000003d77_ 2ef20700000000002c0100000000000058020000010164646464917c') 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now