How to add your own program for CCleaner for Windows to clean

Add any program on your system for cleaning with CCleaner: 

This page explains the types of programs that you can add for cleaning, how to add them, and goes into some technical information on this topic, including coding. If you are unfamiliar with coding, this page may not be suitable for you. Here is a full list of the topics covered on this page:

  • Programs you want to add must store data in these 2 ways
  • Important information about creating INI files for applications
  • Adding your own program to the INI file
  • Identifying the location of application files
  • Finding the location of application Registry keys
  • File mask options when you choose files
  • Registry mask options when choosing Registry keys

Note: The contents of this page is aimed at advanced users of our app and may require a certain level of technical knowledge and expertise.

Programs you want to add must store data in these 2 ways: 

Files:

For example, the Avant Web browser stores its user data (user-entered search keywords, visited web pages, recent pages, and so on) in .DAT files in its Application Data folder. CCleaner can clean the Avant program by deleting these .DAT files.Registry entries, such as Adobe ImageReady CS 8.0.

Registry:

Programs like Adobe Creative Suite store your user preferences (URL history, save directory, and recent files) in three Registry keys. CCleaner can clean this program by clearing these Registry keys.

Note: Some programs store information in both files and Registry keys. CCleaner can also clean these programs.

Important information about editing or creating INI files for applications:

Before editing or creating an INI file for applications, decide which INI file you want. If you want to start from scratch and remove all applications from the existing list (within CCleaner), create winapp1.ini. If you want to add additional applications to the existing list, create winapp2.ini.

The examples provided in this article are intended as just that, examples. You should check the precise locations of the data your want to clean depending on how you've installed different software on your computer. 

Adding your own program to the INI file:

  1.   Create or open the INI file in Notepad (the Notepad application).
  2.   Use the following entries as a reference.
  • [*A-squared Free]
  • LangSecRef=3024
  • Detect=HKLM\Software\Emsi Software GmbH\a-squared Free
  • Default=True
  • FileKey1=%userprofile%\My Documents\a-squared\Reports|.
  • FileKey2=%programfiles%\a-squared Free\Logs|.

This entry refers to an application that has preferences stored in files.

The first line is the name of the application in square brackets with an asterisk: [*Application]

  • We recommend you use an asterisk in the application's name so that you can easily distinguish between the default and custom applications in the INI file. The asterisk has no programmatic effect.
  • Example: [*A-squared Free]

The second line (LangSecRef) indicates the application's category in the list on the Applications tab:

  • 3021 = Applications
  • 3022 = Internet
  • 3023 = Multimedia
  • 3024 = Utilities
  • 3025 = Windows
  • 3026 = Firefox/Mozilla
  • 3027 = Opera
  • 3028 = Safari
  • 3029 = Google Chrome
  • 3030 = Thunderbird
  • 3031 = Windows Store
  • 3032 = CCleaner Browser
  • 3033 = Vivaldi
  • 3034 = Brave
  • 3035 = Opera GX

To add a new section header instead of an application name, use Section=SectionName instead.

Example 1:

LangSecRef = 3024 [this tells CCleaner that the application should be listed in the Utilities category.]

Example 2:

Section = MorePrograms [this tells CCleaner that you are starting a new section called MorePrograms at this point in the INI file.]

The third line (Detect) contains a check to make sure that the application is installed. It is in these formats:

Detect=[Registry key] detects a program by the presence of a Registry key.

DetectFile=[Path and file] finds a program via the presence of a file (for example, the program's executable).

The fourth line (Default) tells you if certain checkboxes get selected by default (True) or cleared (False).

The fifth line, and any subsequent lines, (FileKeyX), shows the files that are going to be deleted. They are in the format:

FileKeyX=[Path + file] OR [Path + file mask]

This second example is for a program which stores its preferences in Registry keys:

  • [Adobe ImageReady CS]
  • LangSecRef=3021
  • Detect=HKCU\Software\Adobe\ImageReady 8.0
  • Default=True
  • RegKey1=HKCU\Software\Adobe\ImageReady 8.0\Preferences\URLHistory
  • RegKey2=HKCU\Software\Adobe\ImageReady 8.0\Preferences|SaveDir
  • RegKey3=HKCU\Software\Adobe\ImageReady 8.0\Preferences\RecentFiles

The fifth line, and subsequent lines, (RegKeyX), indicates the Registry keys that are going to be cleaned. They are in the format:

RegKeyX=[Registry key path]

Note: You must separate each entry in the INI file by at least one blank line.

Identifying the location of application files:

Application files are located in one of the following areas:

  1.   The application's installation folder.
  2.   The %APPDATA% folder under the application name.

To identify an application's installation folder, right-click its icon on the Start menu, and then click Properties.

Finding the location of application Registry keys:

Application Registry keys are typically located in HKCU (HKEY_CURRENT_USER) under the SOFTWARE key. Sometimes they may be located in HKLM (HKEY_LOCAL_MACHINE) under the SOFTWARE key. Please see the screenshot below for a visual example of what we mean by the SOFTWARE key.

Clipboard01_2.png

File mask options when you choose files:

You can use the following file mask options to specify which files are to be deleted:

  • | - the pipe symbol is used to separate file mask options.
  • *.* - deletes every file in that folder. Example: %ProgramFiles%\Yahoo!\Messenger\Profiles|*.*
  • RECURSE - deletes subfolders and their contents. Example: "%ProgramFiles%\Yahoo!\Messenger\Profiles|*.*|RECURSE" (The "Profiles" folder contents will be deleted, but the folder itself will not)
  • REMOVESELF - is the same as RECURSE, but it deletes the folder as well. Example: "%ProgramFiles%\Yahoo!\Messenger\Profiles|*.*|REMOVESELF" (The "Profiles" folder will be deleted)
  • *.<extension> - deletes all files in the folder with the stated extension, for example: *.LOG

You can also clean certain files. Identify them with the file name and extension, for example: deletelog.txt

Registry mask options when choosing Registry keys:

| - the pipe symbol is used to separate the different parts of the registry reference. It is only needed if you want to specify a particular value within a Registry key, for example: "HKCU\Software\Adobe\ImageReady 8.0\Preferences|SaveDir"

These are the short forms for different Registry hives (sections) that are commonly used:

  • HKCU - HKEY_CURRENT_USER
  • HKLM - HKEY_LOCAL_MACHINE
  • HKU - HKEY_USERS

Need to find your product license key?

Go to our license lookup page and enter your registered email address to retrieve info about your products, including product download links, license key(s), and expiry dates.

Send me my license details

Articles in this section