windoz Posted March 6, 2008 Share Posted March 6, 2008 Hi, I have searched the forums but unable to find an answer to this problem. We have a number of laptops which seem to have the monitor standby time set to 20 mins default. I have a script which can change the values in powercfg.cpl, can someone please show me how I can open control panel and then launch power options by using autoIT ? Any help is appreciated, windoz. Link to comment Share on other sites More sharing options...
weaponx Posted March 6, 2008 Share Posted March 6, 2008 Ever hear of powercfg.exe from the command line?http://www.jsifaq.com/SF/Tips/Tip.aspx?id=5594 Link to comment Share on other sites More sharing options...
windoz Posted March 6, 2008 Author Share Posted March 6, 2008 Ever hear of powercfg.exe from the command line?http://www.jsifaq.com/SF/Tips/Tip.aspx?id=5594Hi,I have used the powercfg.exe but with user rights, sometimes they are unable to run command prompts...I mean I have all the code for changing the standby time to 'never' but no code for executing power options in control panel in autoit.. Link to comment Share on other sites More sharing options...
weaponx Posted March 6, 2008 Share Posted March 6, 2008 ShellExecute("Control.exe", @SystemDir & "\powercfg.cpl") Link to comment Share on other sites More sharing options...
windoz Posted March 6, 2008 Author Share Posted March 6, 2008 ShellExecute("Control.exe", @SystemDir & "\powercfg.cpl")Hi,Trying to run control panel under 'normal user' rights is limited. I am running the control panel as administrator, and then trying to run power options through that...everything is working apart from trying to use Autoit to find the power options within control panel and executing it.... Link to comment Share on other sites More sharing options...
weaponx Posted March 6, 2008 Share Posted March 6, 2008 So use RunAsSet() before you call this command. Link to comment Share on other sites More sharing options...
windoz Posted March 6, 2008 Author Share Posted March 6, 2008 So use RunAsSet() before you call this command.Cheers!All working fine now!!!Thanks..... 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