Microsoft KB Archive/135068

{|
 * width="100%"|

HOWTO: Start a Control Panel Applet in Windows 95 or Later

 * }

Q135068

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), used with:
 * Microsoft Windows 95
 * Microsoft Windows 98
 * the operating system: Microsoft Windows NT 4.0
 * the operating system: Microsoft Windows 2000

-

SUMMARY
Applications running under the said 32-bit Windows platforms can start a Control Panel applet by using the RUNDLL32 utility.

MORE INFORMATION
Control.exe is a utility that is included with Windows 95, Windows 98, Windows NT 4.0, and Windows 2000 that launches Control Panel applications. Applications can use the following command line to start a Control Panel applet:

"control.exe mycontrol.cpl" This 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,2 The Control.exe application recognizes special names for commonly-used Control Panel applications. Use these names instead of launching the corresponding .cpl file directly. For a list of these special names, see the following MSDN Web site:

"http://msdn.microsoft.com/library/psdk/shellcc/shell/Shell_Adv/ConPanel.htm#Executing_Control_Pa"