Results 1 to 3 of 3
  1. #1
    WS Lounge VIP Rick Corbett's Avatar
    Join Date
    Dec 2009
    Thanked 518 Times in 420 Posts

    Create your own Control Panel Applet(s)

    I've been configuring a Windows 7 laptop for my sister to replace her old Windows XP one now that OS support is ending. On the old laptop I had used J S Payne's CPL Maker to create some Control Panel Applets to run several of my favourite utilities.

    The advantages of having utilities called from the Control Panel are:
    • Shortcuts on the Windows desktop or Start menu cannot be renamed or deleted (for example, by her children).
    • As a result, when I'm on the phone to her I know the exact name and location of the utility I'm asking her to run.
    • There's no 'un-install' option visible. (I delete any Start menu shortcuts to any uninstallers.)
    • The Control Panel Applet is visible to all users and, if I want, I can get it to only appear in certain Control Panel categories.
    • If there are a lot of applications installed then it's often quicker for someone to find a CPL applet then scroll down a long list in a Start menu.

    Unfortunately I soon found that CPL Maker doesn't work with Windows 7. I knew it must be possible after seeing the Flash Player and Java Control Panel Applets that are added by their installation. I looked around and, on MSDN, found How to Register Executable Control Panel Items. The article looked complex but I soon found that it was actually incredibly easy to create a very simple registry (.REG) file that did what I wanted.

    In case it's useful to you, I thought I would document the steps:

    First, a slight caution. It's not exactly a warning 'cos you aren't going to be deleting any information from the registry nor amending any existing information, only adding 2 registry keys (and a couple of sub-keys) to describe your new Control Panel applet. However, it IS the registry so, for safety's sake, back it up by creating a Restore Point:

    1. Click on the Start orb and enter Create a restore point in the Search programs and files text box.
    2. Click on Create a restore point when it appears in the results list.
    3. Click on the Create... button at the bottom of the dialog that appears. (Alternatively, click on Start > Control Panel > System > System Protection [in the left pane] to get to the same dialog.)
    4. Type a description (e.g. My custom CPL applet) then click on the Create button.
    5. Click on the Close button to dismiss the confirmation dialog then on the OK button to dismiss the System Properties dialog.

    Here are the 3 basic steps to create a new Control Panel Applet:

    1. Create a GUID. (GUID is an acronym for 'Globally Unique Identifier', i.e. a unique reference number.)
    2. Depending on the 'bitness' of your utility and OS, use one of the attached .REG files and open it in Notepad.
    3. Amend the details in the .REG file then save the changes using a new filename.

    All you have to do now is double-click on the .REG file (and click on the Yes, Yes and OK buttons that appear) to merge the new information into the registry. Open the Control Panel and the new applet for your utility should now be visible. It really is that easy... just make sure you use the right .REG file:

    x32-in-x32-cpl.reg for a 32-bit utility running in a 32-bit OS,
    x86-in-x64-cpl.reg for a 32-bit utility running in a 64-bit OS.
    x64-in-x64-cpl.reg for a 64-bit utility running in a 64-bit OS.
    (Note: The forum uploader doesn't allow the attachment of .REG files so I've had to rename the file extensions to .TXT. Download them and rename the file extensions back to .REG.)

    I decided to add TeamViewer 9 Quick Support as a Control Panel applet. Here are the steps in greater detail:

    1. I downloaded TeamviewerQS. This is a 32-bit standalone utility (i.e. it doesn't need to be installed) and will be running in a 64-bit version of Windows 7 so I created a folder in C:\Program Files (x86) and moved the utility into it (and renamed it from "TeamViewerQS_en.exe" to "TeamViewer9_QuickSupport.exe" to make it clearer what version it is).
    2. I used a copy of x86-in-x64-cpl.reg and opened it in Notepad.
    3. I used Online GUID Generator to create a new GUID. I put a tick in the Uppcase and Braces checkboxes then clicked on the button to generate an uppercase GUID in the same format used in the Windows Registry.
    4. I copied the new GUID and pasted it several times into the file opened in Notepad, making sure I overwrote all the existing GUIDs.
    5. I amended the name of the utility and its location then saved the changes to the .REG file using a filename describing the new CPL applet, e.g. teamviewer-qs-cpl.reg.

    After double-clicking on the .REG file and accepting the changes, voilą... the new Control Panel applet (plus a few others I created for some of Nir Sofer's excellent utilities):

    Note: If you get a message that the import failed after double-clicking on the .REG file then it's most likely you are logged in to a user account with reduced rights. In this case, click on the Start orb, type regedit in the Search programs and files text box then, when regedit appears in the results list, right-click on it and choose Run as administrator. Click the Yes button in the UAC dialog then, when the Registry Editor opens, use File > Import... to merge the .REG file.

    That's about it... except, if you want to control the CPL categories that your applet appears in, have a look at Assigning Control Panel Categories. I always change the view of Control Panel to Small icons so I always leave the category setting at 0. However, if I did use Category view and wanted my TeamViewer applet to appear in both the "Network and Internet" and "Programs" categories then I would have changed the following line:

    If you want to remove your custom Control Panel applet, do the following:
    1. Open the .REG file you created for your applet.
    2. Delete the sub-keys and values, leaving only the 2 main keys.
    3. Add a hyphen behind each of the two opening square brackets.
    4. Save the .REG file with a different filename, e.g. remove-teamviewer-qs-cpl.reg.

    Windows Registry Editor Version 5.00
    @="TeamViewer 9 Quick Support"
    @="TeamViewer 9 Quick Support"
    "InfoTip"="@C:\\Program Files (x86)\\Teamviewer\\TeamViewer9_QuickSupport.exe"
    "System.ApplicationName"="TeamViewer 9 Quick Support"
    @="C:\\Program Files (x86)\\Teamviewer\\TeamViewer9_QuickSupport.exe"
    @="C:\\Program Files (x86)\\Teamviewer\\TeamViewer9_QuickSupport.exe"
    Windows Registry Editor Version 5.00
    After double-clicking on this new .REG file and accepting the changes your custom applet will disappear from the Control Panel. (Note: This only removes the applet, not the utility itself.)

    Hope this helps...
    Last edited by Rick Corbett; 2014-04-05 at 21:11.

  2. The Following 3 Users Say Thank You to Rick Corbett For This Useful Post:

    bbearren (2015-02-21),RetiredGeek (2014-04-05),wavy (2014-04-07)

  3. #2
    New Lounger
    Join Date
    Feb 2015
    Thanked 0 Times in 0 Posts

    Angry I can''t find the download for your reg files?

    This is nice tips, but I can''t find the reg files? Where are they?

  4. #3
    WS Lounge VIP Rick Corbett's Avatar
    Join Date
    Dec 2009
    Thanked 518 Times in 420 Posts
    Hi viettungvuong - Re-using .reg files and an Online GUID Generator was always a bit 'kludgy' so I wrote an AutoHotkey script that generates a new GUID then creates a new .reg file based on whatever executable file you point a file selector at.

    Creating the script was made much easier when I discovered - during testing with both 32-bit and 64-bit versions of Windows 7 - that Windows doesn't care whether you use the 64-bit version of the namespace as long as you get the file location of the target executable correct for the 'bitness'.

    For example:
    works just as well as:
    This meant that I could dispose of 3 different versions of .reg files (x32-in-x32-cpl.reg, x86-in-x64-cpl.reg and x64-in-x64-cpl.reg) and just automate the creation of a single .reg file for all situations.

    Here's the AutoHotkey script:
    ; Thanks to AutoHotkey Community member Ferry for the GUID creation (
    ; Thanks to AutoHotkey Community member Garry for sorting the GUID parsing (
    TypeLib := ComObjCreate("Scriptlet.TypeLib")    
    GUID := TypeLib.Guid
      guidx .= a%A_Index%
    ;GUID = {F076BF16-7996-427B-B767-7F50B583AA7B}  ; For testing purposes
    NewRegFile = %A_ScriptDir%\NewCPL.reg
    FileSelectFile, SelectedFile, 3,%A_ProgramFiles%, Open a file, Programs (*.exe)
    if SelectedFile =
        MsgBox, The user didn't select anything.
        SplitPath, SelectedFile, name, dir, ext, name_no_ext, drive
    StringReplace, Target, SelectedFile, \, \\, All
    TargetFile := name_no_ext
    StringUpper, TargetFile, TargetFile, T ; Change filemame to title case for display purposes
      FileDelete %NewRegFile%  ; In case previous run was terminated prematurely.
    Windows Registry Editor Version 5.00
    RunWait notepad.exe %NewRegFile%
    ;run,%NewRegFile%           ;- run textfile
    When you run the script it generates a new GUID on the fly then presents a file selector for you to choose which executable you want. When you've chosen an executable the script will then generate a new .reg file for you and open it in Notepad for you to check.

    When I get round to it I might tidy it up a bit to also automatically generate a second .reg file to remove the Control Panel applet again but, to be honest, it's not a priority as I was only removing the applets during testing.

    You'll need to download AutoHotkey. I also use SciTE4AutoHotkey for editing AHK scripts.

    I've also added a .zip file which includes the script as both a .AHK file and a compiled version.
    Create your own Control Panel

    Hope this helps...
    Last edited by Rick Corbett; 2015-02-23 at 09:19. Reason: spelling error

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts