How to add other areas of Windows for CCleaner to clean

You can use the winsys2.ini and winsys1.ini files to add Windows folders and system Registry keys for CCleaner to clean.

First, determine how the Windows feature operates. Does it store its data in the Registry, in files, or in some other method?

Note: 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 in CCleaner, create winapp1.ini. If you want to add additional applications to the existing list, create winapp2.ini.

To add Windows files or Windows-specific Registry keys to the INI file:

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

The first entry refers to a Windows feature whose data is stored 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:

  • 3001 = Internet Explorer
  • 3002 = Windows Explorer
  • 3003 = System
  • 3004 = Advanced

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.

Optionally, you can enter a string for a popup warning for this operation when you select the check box 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 mask options when choosing 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. 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, above. The fifth line indicates the Registry key to be cleaned:

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

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

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

Note: If you examine the internal CCleaner INI files (available on the Piriform forum), you'll notice that certain operations in the winsys.ini file use the SpecialKey feature. This calls internal cleaning routines from the CCleaner executable. You cannot access SpecialKeys from a custom INI file.

Looking to clean up your business? Learn More

×