Skip navigation

JSI Tip 9440. How do I get Control Panel to list 'My CPL'?


If you have a .CPL file that is not listed in Control Panel, it is because one of the following is true:

  • The .CPL file is NOT located in the %SystemRoot%\System32 folder.
  • The .CPL file is NOT registered.

If your .CPL file has an applet name of My CPL and it is located at C:\Folder\MyCPL.CPL, you can register it for all users by adding the My CPL Value Name to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cpls. To register it for just the current user, add the Value Name to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cpls. The data type can be REG_EXPAND_SZ or REG_SZ. Set the data value to the full path to the .CPL file, like C:\Folder\MyCPL.CPL.

Using REG.EXE, built into Windows XP, Windows Server 2003, and later, or installed on Windows 2000 from the Support Tools on the operating system CD-ROM, I have scripted MyCPL.BAT to register a .CPL file.

The syntax for using MyCPL.BAT is:

MyCPL Name CPLPath \[/U\]

Where Name is the applet name that will appear in Control Panel, like My CPL, CPLPath is the full path to the .CPL file, like C:\Folder\MyCPL.CPL, and /U is an optional parameter that will register the .CPL file for the current user only.

NOTE" Depending on where you register the .CPL file, a logoff or restart will be required.

MyCPL.BAT contains:

@echo off
setlocal
set Usr=N
if \{%2\}

\{\} goto err set name=%1 set CPLP=%2 if \{%3\}

\{\} goto doit if /i \{%3\}==\{/U\} set Usr=Y&goto :doit :err @echo Syntax: MyCPL Name CPLPAth \[/U\] endlocal goto :EOF :doit set key1=HKLM if "%Usr%" EQU "Y" set key1=HKCU set key2=\SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cpls @echo REG ADD "%key1%%key2%" /V %name% /T REG_SZ /F /D %CPLP% REG ADD "%key1%%key2%" /V %name% /T REG_SZ /F /D %CPLP% endlocal



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish