- Introducing CCleaner
- Using CCleaner
- CCleaner Rules
- CCleaner Settings
- CCleaner How Tos
- Command-line parameters
CCleaner .INI files
- What do CCleaners INI files do?
- How to add your own program for CCleaner to clean
- How to clean user data from non-standard Mozilla browsers
- How to add other areas of Windows for CCleaner to clean
- How to run Visual Basic scripts during the Cleaning process
- Environment variables and system variables in CCleaner
- Using ccleaner.ini to modify how CCleaner runs
- How to Exclude Items from CCleaners Cleaning
How to add your own program for CCleaner to clean
You can add any program on your system to CCleaner so that its data can be cleaned, as long as it uses one of the following methods to store its data:
- Files: For example, the Avant Web browser (http://www.avant.com) 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: For example, Adobe ImageReady CS 8.0 (http://www.adobe.com/products/creativesuite/) stores user preferences (URL history, save directory, and recent files) in three Registry keys. CCleaner can clean this program by clearing these Registry keys.
Some programs store information in both files and Registry keys. CCleaner can also clean these programs.
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 your own program to the INI file:
1. Create or open the INI file in Notepad.
2. Use the following entries as a reference.
Detect=HKLM\Software\Emsi Software GmbH\a-squared Free
This entry refers to an application whose preferences are stored in files.
The first line is the name of the application in square brackets with an asterisk: [*Application]
- We recommend that you use an asterisk in the application's name so that you can easily distinguish between default and custom applications in the INI file. The asterisk has no programmatic effect.
- Example: [*Avant Browser]
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
To add a new section header instead of an application name, use Section=SectionName instead.
- Example: 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 the format:
Detect=[Registry key] to detect a program by the presence of a Registry key, OR
DetectFile=[Path and file] to detect a program by the presence of a file (for example, the program's executable).
The fourth line (Default) indicates whether the check box will be selected by default (True) or cleared (False).
The fifth and any subsequent lines (FileKeyX) indicate the files 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]
The fifth and subsequent lines (RegKeyX) indicate the Registry keys to clean. 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.
To identify the location of application files
Application files are usually located in one of the following areas:
1. The application's installation folder.
2. The %APPDATA% folder, under the application name.
To identify the application's installation folder, right-click its icon on the Start menu, and then click Properties.
To identify 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.
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
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