How to add other areas of Windows for CCleaner to clean

Getting CCleaner to clean other areas of Windows:

This page focuses on how you can use INI files to add items for CCleaner to clean. It also goes into detailed information about code. If you're unfamiliar with code, this page may not be suitable for you. Here is a full list of the topics covered:

  • Adding Windows folders and system Registry keys for cleaning:
  • Editing or creating an INI file for applications
  • Checking the precise location(s) of the data you want to clean
  • Adding Windows files or Windows-specific Registry keys to an INI file
  • File masking options when choosing files
  • Registry masking options when choosing Registry keys

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

Adding Windows folders and system Registry keys for cleaning:

You can use the winsys2.ini and winsys1.ini files to do this, but first, you need to determine how the Windows file or folder operates. Does it store its data in the Registry, in files, or in some other method?

Editing or creating an INI file for applications:

Before doing this, you need to decide which INI file you want. If you want to start from scratch and remove all applications from the existing list in CCleaner, create winapp1.ini. If you want to add additional applications to the existing list, create winapp2.ini.

Checking the precise location(s) of the data you want to clean: 

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

Adding Windows files or Windows-specific Registry keys to an INI file:

  1. Create or open the INI file in Notepad (the Notepad application).
  2. Use the following entries as a reference.

The first entry refers to a Windows feature that stores its data in files.

[Chkdsk File Fragments]

LangSecRef=3003

LangRef=3144

Default=True

FileKey1=%SystemDrive%|File.chk

The first line is the name of the feature in square brackets:  [Feature]

The second line, LangSecRef, indicates the feature's category in the list on the Windows tab:

The fourth line, Default, determines if this feature gets checked by default.

  • 3001 = Internet Explorer
  • 3002 = Windows Explorer
  • 3003 = System
  • 3004 = Advanced
  • 3005 = Microsoft Edge
  • 3006 = Edge Chromium

The third line, LangRef, provides an internal string reference to the title for this operation (for example, a pointer to the phrase 'CHKDSK File Fragments' inside the CCleaner program). Do not use this line in your custom entry.

As an option, you can also enter a string for a popup warning for this operation when you select the checkbox in CCleaner. For your custom entry, use the following line:

Warning="This will delete all of the user preferences for this application."

The fifth (and any subsequent) lines indicate the files to be deleted. They are in the format:

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

File masking options when choosing files:

You can use the following file mask options to specify which files you want to delete:

  • | - 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. Example: *.LOG

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

The second example is for a feature that uses Registry keys which need to be cleaned:

[Menu Order Cache]

LangSecRef=3004

LangRef=3125

WarningRef=3203

RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder

The first four lines use the same syntax as the first example (shown above). The fifth line shows the Registry key that is going to be cleaned.

Registry masking 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. Example: "HKCU\Software\Adobe\ImageReady 8.0\Preferences|SaveDir"

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

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

Note: If you examine the internal CCleaner INI files (which can be created by running CCleaner with the /export command-line argument), you'll notice that certain operations in the winsys.ini file use the SpecialKey feature. This calls for internal cleaning routines from the CCleaner executable. You cannot access SpecialKeys from a custom INI file.

 

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