Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: NT 95 98 ME 2000 Control Panel Applet command line launching IgnoreInput BlockInput
To immediately test the desired statement, use the Windows Run command from the Start Menu, and paste in the code line below. In WinBatch, use the RUN function or similar routine to launch the control panel app. Maintaining commas, spaces and special characters is extremely important, so take care when pasting into a string into your WinBatch script.
rundll32.exe shell32.dll,Control_RunDLL filename.cplTo select a particular applet within the file, append a comma, an @ sign, and the zero-based number of the applet. For example, to launch the keyboard applet, which is the second applet within Main.cpl, you would use this command:
rundll32.exe shell32.dll,Control_RunDLL main.cpl,@1If the CPL file does not contain an applet matching the number you've passed, nothing will happen. Thus you can identify the applets within a CPL file empirically by repeating this command from a Windows command prompt, ending with @0, @1, @2, and so on.
Some multipage applets are designed so that they can be opened at a particular page. To do so, you must specify the applet number (@0 for a single-applet file). Then append a comma and the page number. The Microsoft Knowledge Base says that the page number, if supported, is 1-based, but a bit of experimenting shows that some are 0-based. This command line launches the Display Properties dialog and opens to the Appearance page (the third page; number two in a zero-based scheme):
rundll32.exe shell32.dll,Control_RunDLL desk.cpl,@0,2Again, it's very simple to experiment with these possibilities at a Windows command prompt. Once you've determined the correct command to invoke the applet you want, you can use that command in a Winbatch script.
control.exe mycontrol.cplThis starts the first control panel applet in Mycontrol.cpl. If you have multiple Control Panel applets in Mycontrol.cpl, you need to add to the following line exactly as shown:
Control.exe mycontrol.cpl,@1@1 specifies the second (zero-based) applet in the .cpl file. If you don't specify this parameter, @0 is used by default.
The final (optional) parameter serves as the command line parameters passed to the Control Panel applet in the CPL_STARTWPARM notification. For example, some of the system's Control Panel applets take the page number (one based, not zero based) as the command line parameter. For example, if you want to start the Add/Remove Programs applet from the Windows Setup page so you can instruct the user to add extra system components, you can use this code:
Control.exe appwiz.cpl,@0,2The Control.exe application recognizes special names for commonly-used Control Panel applications. Use these names instead of launching the corresponding .cpl file directly. If there is a special name available, it should be listed below.
For the actual Window commandlines see the article Windows Control Panel Commandline
Make sure your statement is all on one line, and case can count..... The string "Control_RunDLL" is case sensitive.
;32bit ODBC
Run("rundll32.exe", "shell32.dll,Control_RunDLL odbccp32.cpl") *or* Run("control.exe", "odbccp32.cpl") ;Add New Hardware
Run("rundll32.exe", "shell32.dll,Control_RunDLL sysdm.cpl,Add New Hardware") *or* Run("control.exe", "sysdm.cpl,Add New Hardware") ;Accessibility Properties
Run("rundll32.exe", "shell32.dll,Control_RunDLL access.cpl") *or* Run("control.exe", "access.cpl") ;Add/Remove Programs
Run("rundll32.exe", "shell32.dll,Control_RunDLL appwiz.cpl") *or* Run("control.exe", "appwiz.cpl") ;Briefcase
; creates a NEW Briefcase on the desktop Run("rundll32.exe", "syncui.dll,Briefcase_Create") ;Date/Time
Run("rundll32.exe", "shell32.dll,Control_RunDLL timedate.cpl") *or* Run("control.exe", "timedate.cpl") *or* Run("control.exe", "date/time") ;Copy Disk Dialog
; displays the Copy Disk Dialog for removable media Run("rundll32.exe", "diskcopy.dll,DiskCopyRunDll") ;Display / Desktop
Run("rundll32.exe", "shell32.dll,Control_RunDLL desk.cpl") *or* Run("control.exe", "desk.cpl") *or* Run("control.exe","desktop") *or* ; Launches the Desktop Display Control Panel subprogram, with the Appearance tab preselected. Run("control.exe","color") ;Dialup Network wizard
Run("rundll32.exe"," rnaui.dll,RnaWizard") TIP: How to start Windows 95 Dial-up Networking directly: Here's how to open the Dialup-networking window directly with SID (system ID): Run("C:\WINDOWS\EXPLORER.EXE","::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{992CFFA0-F557-101A-88EC-00DD010CCC48}") ;Launch a specific Connectoid
Run("rundll32.exe"," rnaui.dll,RnaDial {Connectoid}") *OR* Run("rasdial.exe","Connectoid") ;Fonts
Run("rundll32.exe", "shell32.dll,Control_RunDLL main.cpl,Fonts") *or* Run("control.exe", "main.cpl,Fonts") *or* Run("control.exe","Fonts") ;Keyboard
Run("rundll32.exe", "shell32.dll,Control_RunDLL main.cpl,Keyboard") *or* Run("control.exe", "main.cpl,@1") *or* Run("control.exe","Keyboard") ;Internet Properties
Run("rundll32.exe", "shell32.dll,Control_RunDLL INETCPL.CPL") *or* Run("control.exe", "INETCPL.CPL") ;Mail and Fax
Run("rundll32.exe", "shell32.dll,Control_RunDLL mlcfg32.cpl") *or* Run("control.exe", "mlcfg32.cpl") ;Microsoft Mail Postoffice
Run("rundll32.exe", "shell32.dll,Control_RunDLL wgpocpl.cpl") *or* Run("control.exe", "wgpocpl.cpl") ;Modems
Run("rundll32.exe", "shell32.dll,Control_RunDLL modem.cpl") *or* Run("control.exe", "modem.cpl") ;Mouse
Run("rundll32.exe", "shell32.dll,Control_RunDLL main.cpl") *or* Run("control.exe", "main.cpl") *or* Run("control.exe","mouse") ;Multimedia
Run("rundll32.exe", "shell32.dll,Control_RunDLL mmsys.cpl") *or* Run("control.exe", "mmsys.cpl") ;95 Network
Run("rundll32.exe", "shell32.dll,Control_RunDLL netcpl.cpl") *or* Run("control.exe", "netcpl.cpl") ;NT Network
Run("rundll32.exe", "shell32.dll,Control_RunDLL ncpa.cpl") *or* Run("control.exe", "ncpa.cpl") ;ODBC
Run("rundll32.exe", "shell32.dll,Control_RunDLL odbcinst.dll") ;Passwords
Run("rundll32.exe", "shell32.dll,Control_RunDLL password.cpl") *or* Run("control.exe", "password.cpl") ;Printers
Run("rundll32.exe", "shell32.dll,Control_RunDLL main.cpl,Printers") *or* Run("control.exe", "Printers") ;Regional Settings
Run("rundll32.exe", "shell32.dll,Control_RunDLL intl.cpl") *or* Run("control.exe", "intl.cpl") *or* Run("control.exe","international") ;Sounds
Run("rundll32.exe", "shell32.dll,Control_RunDLL mmsys.cpl,Sounds") *or* Run("control.exe", "mmsys.cpl,Sounds") ;System
Run("rundll32.exe", "shell32.dll,Control_RunDLL sysdm.cpl") *or* Run("control.exe", "sysdm.cpl") ;Open AddPrinters window
Run("rundll32.exe", "shell32.dll,SHHelpShortcuts_RunDLL AddPrinter") ;Open Printers folder
Run("rundll32.exe", "shell32.dll,SHHelpShortcuts_RunDLL PrintersFolder") *or* Run("control.exe","printers") ;Open Map Network Drive window
Run("rundll32.exe", "shell32.dll,SHHelpShortcuts_RunDLL Connect") ;Open Disconnect Network Drive window
Run("rundll32.exe", "shell32.dll,SHHelpShortcuts_RunDLL Disconnect") ;Open Fonts Folder
Run("rundll32.exe", "shell32.dll,SHHelpShortcuts_RunDLL FontsFolder") ;Format drive
Run("rundll32.exe", "shell32.dll,SHFormatDrive")
NT specific Control Panel Applets:
Console Run("rundll32.exe","shell32.dll,Control_RunDLL console.cpl,Console") PCMCIA Run("rundll32.exe","shell32.dll,Control_RunDLL devapps.cpl,@0") Devices tool start... Run("rundll32.exe","shell32.dll,Control_RunDLL srvmgr.cpl,@2") *or* Run("rundll32.exe","shell32.dll,Control_RunDLL srvmgr.cpl,Devices") Ports Run("rundll32.exe","shell32.dll,Control_RunDLL ports.cpl") SCSI Run("rundll32.exe","shell32.dll,Control_RunDLL devapps.cpl,@1") Server tool start... Run("rundll32.exe","shell32.dll,Control_RunDLL srvmgr.cpl,@0") *or* Run("rundll32.exe","shell32.dll,Control_RunDLL srvmgr.cpl,Server") Services tool start... Run("rundll32.exe","shell32.dll,Control_RunDLL srvmgr.cpl,@1") *or* Run("rundll32.exe","shell32.dll,Control_RunDLL srvmgr.cpl,Services") Tape Devices Run("rundll32.exe","shell32.dll,Control_RunDLL devapps.cpl,@2") Telephony Run("rundll32.exe","shell32.dll,Control_RunDLL telephon.cpl") UPS Run("rundll32.exe","shell32.dll,Control_RunDLL ups.cpl,UPS") ;Launch HotPlug Manager (remove/delete device) Run("rundll32.exe","shell32.dll,Control_RunDLL hotplug.dll")
For Windows 2000 and later systems:
; Launches the Folder Settings Control Panel subprogram. Run("control.exe","folders") ; Launches the Novell NetWare Control Panel subprogram (if installed). Run("control.exe","netware") ; Launches the Phone and Modem Options Control Panel subprogram. Run("control.exe","telephony") ; Displays the Administrative Tools folder. Run("control.exe","admintools") ; Displays the Scheduled Tasks folder. Run("control.exe","schedtasks") ; Displays the Network and Dial-Up Connections folder. Run("control.exe","netconnections") ; Launches the Infrared Control Panel subprogram (if installed). Run("control.exe","infrared") ; Launches the Users and Passwords Control Panel subprogram. Run("control.exe","userpasswords")P>
For Windows XP and later systems:
; Launches the Net Connection Wizard Control Panel subprogram. Run("rundll32.exe","netshell,startNcw")
Article ID: W14617
Filename: Running Control Panel Applets.txt
File Created: 2017:08:29:11:51:02
Last Updated: 2017:08:29:11:51:02