Sign in to follow this  
Followers 0
shornw

Control Panel items

9 posts in this topic

This is gonna make me look really stupid.....How do you run an item from the Control Panel??

This is part of a software rollout, there are all sorts of different machines (Circa 1000) Screen resolutions, Software installs so i cant use Send("{LWIN}r") as there may be other items, and I cant Run.cpl) files...I've tried _RunDos to no effect

Also is there a way to create a new folder from within a script, I can only see FileCreateShortcut

Apologies if I'm being feeble but I cant seem to find any info on these items anywhere.

Thanks for looking


[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Share this post


Link to post
Share on other sites



Run "control" to run the cpl file.

Run('control main.cpl')

:D

Share this post


Link to post
Share on other sites

Also is there a way to create a new folder from within a script, I can only see FileCreateShortcut

DirCreate



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

For run *.cpl try this:

Run("control.exe ncpa.cpl") ; or any other *.cpl

Share this post


Link to post
Share on other sites

Tremendous....Thanks guys -all works

As a matter of interest where do you find this stuff out, I have to come here and ask questions and end up relying on people's good nature and also looking like an idiot. Is there somewhere I dont know about?

The DirCreate was just down to my not thinking broader, but I read through the Run command and cant find anything to do with 'control' anywhere


[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Share this post


Link to post
Share on other sites

As a matter of interest where do you find this stuff out, I have to come here and ask questions and end up relying on people's good nature and also looking like an idiot. Is there somewhere I dont know about?

Ofcourse Google is a good method to find out things. Another concept is to go into folder options and look at filetypes. You know that you want to run a .cpl file so when you look at the advanced properties of .cpl, then you will see this as it's open command

rundll32.exe shell32.dll,Control_RunDLL "%1",%*

That can be converted to

$cpl = 'main.cpl'
Run('rundll32.exe shell32.dll,Control_RunDLL ' & $cpl)

and also control.exe exists for the task also. :D

Share this post


Link to post
Share on other sites

Here is one that I use to launch the System object directly to the Remote Assistance tab. You can change the 6 to another number to automatically launch the window on a specified tab. They start at 0

Run("rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,6")

Mike


Share this post


Link to post
Share on other sites

A good Rundll reference list here. :D

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