dufran3 Posted November 1, 2006 Share Posted November 1, 2006 (edited) This is what I am trying to do. Change the power settings of a computer. Change everything to "never" and disable hibernate. I would like to accomplish this without having to open up the actual powercfg.cpl control panel. This is what I have. I went under the power settings, changed all the settings to "never" then choose save as, then created a name for it. What happens is, I go look under the control panel when running this on another computer, and the settings are at normal home/office settings, but with the correct power policy name...any help with this would be awsome! Func PowerPC() ;Change Power Profile $CurrentPower = "HKCU\Control Panel\PowerCfg\" $CurrentPowerVal = RegRead($CurrentPower,"CurrentPowerPolicy") $powerpath = "HKCU\Control Panel\PowerCfg\PowerPolicies\6" $powerval = Regread($powerpath,"Name") RegWrite($powerpath) RegWrite($powerpath,"Description","REG_SZ","Everything always on!") RegWrite($powerpath,"Name","REG_SZ","Custom PC") RegWrite($powerpath,"Policies","REG_BINARY",'01,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,05,00,00,00,00,00,00,0,00,00,00,00,78,00,00,00,32,32,03,02,04,00,00,00,04,00, 00,00,00,00,3d,77,2e,f2,07,00,00,00,00,00,3c,00,00,00,00,00,00,00,b4,00,00,00,00,00,64,64,64,64,91,7c') If $CurrentPowerVal <> "6" Then regwrite($CurrentPower,"CurrentPowerPolicy","Reg_SZ","6") EndIf ;Disable Hibernate _RunDOS("POWERCFG.exe /HIBERNATE off") ;Log Setting Change _LogCheck("1","PowerPC",$powerpath,"Name","Custom PC") EndFunc Edited November 1, 2006 by dufran3 Link to comment Share on other sites More sharing options...
dufran3 Posted November 2, 2006 Author Share Posted November 2, 2006 Any ideas on this? Link to comment Share on other sites More sharing options...
Bert Posted November 2, 2006 Share Posted November 2, 2006 You would be better off using console to set this. How many PCs are we talking about, and are they all on the same network? If they are part of a domain, you could do this with a group policy. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
dufran3 Posted November 2, 2006 Author Share Posted November 2, 2006 200 + pc's, not on a domain. Really can't use AD to set this. Link to comment Share on other sites More sharing options...
Bert Posted November 2, 2006 Share Posted November 2, 2006 All on the same network then? Do they use a logon script? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
dufran3 Posted November 2, 2006 Author Share Posted November 2, 2006 Neg, this little function is a part of a big script I wrote. It is for configuring pc's. Basically, opens a gui on execute, click the options you would like to change/install, then execute, this is one of the options. Link to comment Share on other sites More sharing options...
smstroble Posted November 2, 2006 Share Posted November 2, 2006 *raises hand*you know you could use POWERCFG.exe to do it, seems how you are using it to switch the hibernate anyway...syntax page for it http://www.jsifaq.com/SF/Tips/Tip.aspx?id=8369 MUHAHAHAHAHA Link to comment Share on other sites More sharing options...
dufran3 Posted November 3, 2006 Author Share Posted November 3, 2006 AHHH!!!! Lots of Switches!!! THX Link to comment Share on other sites More sharing options...
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