- 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 Exclude Items from CCleaners Cleaning
Through the user interface, CCleaner users can choose to exclude files, folders, and Registry keys from cleaning.
Similarly, you can exclude files, folders, and Registry keys using entries in the INI when operating CCleaner programmatically, using the ExcludeKey command.
The ExcludeKey string has the following format in INI files:
ExcludeKeyX = [TYPE]|[PATH]|[FILENAME or REGISTRY KEY or FILETYPE or FILETYPES](Note the "|" in between)
- X is a positive whole number. You can add as many entries as you need as long as the numbers don't repeat (for example, ExcludeKey1, ExcludeKey2, and so on).
- The TYPE must either be PATH (to exclude folders), FILE (to exclude specific files), or REG (to exclude Registry entries).
- You must either specify the PATH, PATH and FILENAME, or REGISTRY KEY, depending on which type of content you want to exclude.
- You can only use the FILE switch to exclude a single file. To exclude multiple files of the same type, use the PATH switch and specify an extension (for example, *.txt). To exclude multiple files of different types, use a different ExcludeKey entry for each file.
This will exclude all of the log files with the pattern *-*-*-*.* in the \system32\LogFiles\SCM\ folder of the user's Windows directory.
This will exclude the myfile.txt file located in the \system32\LogFiles folder of the user's Windows directory.
This will exclude the key located at HKCU\software\piriform (and any subentries)
This will exclude the files located in the C:\temp folder and all subfolders.
This will exclude files of types .exe and .bat in the C:\Windows folder.
Note: ExcludeX (not ExcludeKeyX) is a variable CCleaner uses to represent user settings on the Exclude pane in the Options section. ExcludeX will appear in ccleaner.ini when you set it to save settings in that INI file. Do not modify references to ExcludeX or IncludeX.