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.
; <a href='http://support.microsoft.com/default.aspx?scid=kb;EN-US;135068' class='bbc_url' title='External link' rel='nofollow external'>http://support.microsoft.com/default.aspx?scid=kb;EN-US;135068</a> ; 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, 14 September 2012 - 09:20 AM.




