shornw Posted July 5, 2006 Posted July 5, 2006 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]
MHz Posted July 5, 2006 Posted July 5, 2006 Run "control" to run the cpl file. Run('control main.cpl')
BigDod Posted July 5, 2006 Posted July 5, 2006 Also is there a way to create a new folder from within a script, I can only see FileCreateShortcutDirCreate 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
Briegel Posted July 5, 2006 Posted July 5, 2006 For run *.cpl try this: Run("control.exe ncpa.cpl") ; or any other *.cpl
shornw Posted July 5, 2006 Author Posted July 5, 2006 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]
MHz Posted July 5, 2006 Posted July 5, 2006 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.
BigDaddyO Posted July 5, 2006 Posted July 5, 2006 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
herewasplato Posted July 6, 2006 Posted July 6, 2006 ...As a matter of interest where do you find this stuff out, ...http://vbnet.mvps.org/code/system/controlpnl3.htm is just one of many sites to keep handy. [size="1"][font="Arial"].[u].[/u][/font][/size]
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