Sign in to follow this  
Followers 0
Guest mike

Newbie question

5 posts in this topic

Sorry for the question, it's prolly really simple in the end, but I've been trying this for a while and still can't manage to do it on my own.

How do i open the Control Panel and/or Display Properties with autoit?

I understand how to make it work when a window is minimized (exists?) but what about when there is nothing? :D

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Each control panel has the extension *.cpl, and can be found in the %PATH%. Because of this, you just need to get the name of the particular control panel you are opening. In the case of the display (deskop properities) panel, it is called desk.cpl. Since it's in either the system32, or system directory (I forget where excatally), you can use the following line to open that control panel:

Run(@ComSpec & " /c start desk.cpl", "", @SW_HIDE)

That code will open a hidden command window, tell it to start the desk.cpl control panel application, and automatically close the command window when it is finished.

If you want to open an explorer window to the control panel, you'll need to give it the location of the control panel. You can find a list of all CLSID's in the Appendix of the helpfile. The one for the control panel is "::{21EC2O2O-3AEA-1O69-A2DD-08002b30309d}". Therefore, to open an explorer window at that location, use

Run("explorer.exe ::{21EC2O2O-3AEA-1O69-A2DD-08002b30309d}")

Corrected my Run code in the first example

Edited by pekster

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

thanks for the quick reply!

However i used the same thing you put and it didn't work.

Is it because i need to put the full path to the desk.cpl

Share this post


Link to post
Share on other sites

Thanks alot, it looks like i managed to miss that thread.

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