How To Start a Control Panel Applet in Windows 95 or Later (135068)



The information in this article applies to:

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

This article was previously published under Q135068

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:

REFERENCES

For additional information, please see the following article in the Microsoft Knowledge Base:

166168 How To Use RUNDLL32 to Debug Control Panel Applets

164787 INFO: The Windows 95 Rundll and Rundll32 Interface


Modification Type:MinorLast Reviewed:12/16/2004
Keywords:kbCPApplet kbCtrl kbHardware kbhowto KB135068