Jump to content

Control Panel Applets


ptrex
 Share

Recommended Posts

Control Panel Applets - Shortcuts and Scripts Using Control.exe

The parameter @m is used for files with more than one basic function and starts with zero,

which is the default value if no parameter is used. For example, main.cpl controls both mouse and keyboard properties.

Thus, either the command

control main.cpl

or

control main.cpl,@0

would open the mouse properties. To open the keyboard properties the command would be

control main.cpl,@1

The second set of optional parameters "n" can be used when a dialog box is tabbed.

A number of the values are given in Table I. For example, the default window when the mouse properties dialog is opened

is the "Buttons" tab. To open the"Pointer Options" tab (third on the list) the command would be

control main.cpl,@0,2

Note that here the index "n" is zero-based so the third tab has an index of 2.

Many control panel files have only one main page and the "@m" index can be omitted. In that case, to open a particular

tab requires two commas between the file name and the tab index. For example, the dialog box for System Properties has a number

of tabs as listed in the table above. A specific one of these can be opened by adding a parameter so that the command reads

control.exe sysdm.cpl,,n

where "n" is an integer running from 0 to 6 corresponding to the 7 tabs listed in Table I.

Unfortunately, Microsoft is not consistent in how it indexes tabs. For example, when using access.cpl, the tabs run from 1 to 5

instead of beginning with zero. Some files can only be opened at a few tabs or only at the beginning tab. For instance,

Power Options has four tabs but they are not accessible with an index. The only way to find out what system applies to a particular

file seems to be trial and error. Also note that the numbering of tabs for many files is not the same in Windows XP as it was in

Windows 98/Me. Also, at least one change was made in Windows XP SP2.

; http://support.microsoft.com/default.aspx?scid=kb;EN-US;135068

; Some Control Panel Applet Files
; -------------------------------
; access.cpl    Accessibility controls      Keyboard(1), Sound(2), Display(3), Mouse(4), General(5)
; appwiz.cpl    Add/Remove Programs 
; desk.cpl      Display properties          Themes(5), Desktop(0), Screen Saver(1), Appearance (2), Settings(3)
; hdwwiz.cpl    Add hardware    
; inetcpl.cpl   Configure Internet Explorer and
;               Internet properties         General(0), Security(1), Privacy(2), Content(3), Connections(4), Programs(5), Advanced(6)
; intl.cpl      Regional settings           Regional Options(1), Languages(2), Advanced(3)
; joy.cpl       Game controllers    
; main.cpl      Mouse properties and settings   Buttons(0), Pointers(1), Pointer Options(2), Wheel(3), Hardware(4)
; main.cpl,@1   Keyboard properties         Speed(0), Hardware (1)
; mmsys.cpl     Sounds and Audio            Volume(0), Sounds(1), Audio(2), Voice(3), Hardware(4)
; ncpa.cpl      Network properties  
; nusrmgr.cpl   User accounts   
; powercfg.cpl  Power configuration Power Schemes, Advanced, Hibernate, UPS (Tabs not indexed)
; sysdm.cpl     System properties           General(0), Computer Name(1), Hardware(2), Advanced(3), System Restore(4),
;                                           Automatic Updates(5), Remote (6)
; telephon.cpl  Phone and modem options     Dialing Rules(0), Modems(1), Advanced(2)
; timedate.cpl  Date and time properties    Date & Time(0), Time Zone(1), Internet Time (no index)
; date/time.cpl Launches the Date and Time Properties window
; desktop.cpl   Launches the Display Properties window
; color.cpl     Launches the Display Properties window with the Appearance tab preselected
;
; Note that some CPL files are multi-functional and require additional parameters to invoke the various functions.
; Parameters use the "@" sign and a zero-based integer.
; Syntax : control somefile.cpl,<optional arguments>



Run("control.exe sysdm.cpl,,4")

Using these shortcuts you need to use LESS send() commands in your script to access the CTRL panels.

Enjoy !!

ptrex

Edited by ptrex
Link to comment
Share on other sites

You might want to take a look at this page (click on the Control Panel tab)

http://dundats.mvps.org/Windows/Win98/98_Cmd_Switches.htm

The list is for Win 98 but it probably contains some that you don't have.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

@GEOsoft

Thanks for the link look a good reference website !!

I didn't intend to make a exhaustive list of all the .CPL's.

Just wanted to highlight the possibilities.

So anyone else missing something can definitely use the website reference you gave :whistle:

Regards

ptrex

Link to comment
Share on other sites

@GEOsoft

Thanks for the link look a good reference website !!

I didn't intend to make a exhaustive list of all the .CPL's.

Just wanted to highlight the possibilities.

So anyone else missing something can definitely use the website reference you gave :whistle:

Regards

ptrex

You're welcome. As long as people know that the Cpl tabs are zero based then they shouldn't have any problem creating there own list.

I have the full list of standard cpl files and associated tabs for XP as well but I have not built that page yet.

One of these days I'll get around to doing a script that searches for *.cpl and then gets all of the available tabs.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

  • 1 month later...

You're welcome. As long as people know that the Cpl tabs are zero based then they shouldn't have any problem creating there own list.

I have the full list of standard cpl files and associated tabs for XP as well but I have not built that page yet.

One of these days I'll get around to doing a script that searches for *.cpl and then gets all of the available tabs.

Open whole Control Panel

$lnk = @StartMenuCommonDir&"\Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"

if Not FileExists($lnk) Then DirCreate($lnk)

if FileExists($lnk) Then Run("RunAs /u:Administrator " & '"' & @ProgramFilesDir&"\Internet Explorer\IEXPLORE.EXE " & $lnk & '"')

Link to comment
Share on other sites

  • 4 weeks later...
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...