Sign in to follow this  
Followers 0
windoz

Control Panel

7 posts in this topic

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.

Share this post


Link to post
Share on other sites



Ever hear of powercfg.exe from the command line?

http://www.jsifaq.com/SF/Tips/Tip.aspx?id=5594

Hi,

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..

Share this post


Link to post
Share on other sites

ShellExecute("Control.exe", @SystemDir & "\powercfg.cpl")

Share this post


Link to post
Share on other sites

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....

Share this post


Link to post
Share on other sites

So use RunAsSet() before you call this command.

Share this post


Link to post
Share on other sites

So use RunAsSet() before you call this command.

Cheers!

All working fine now!!!

Thanks.....

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  
Followers 0