Scripting CCleaner Business Edition settings

You can automate and control the settings that CCleaner Business Edition uses by simply placing a file containing the settings in the same folder as ccleaner.exe.  The file should be called ccleaner.ini. These settings will override any settings that are already present on the computer.

This allows you to create a single settings file and easily recreate these settings across all the computers you are maintaining.

The following parameters can be used in the ccleaner.ini.

Parameter

Description

Available States

Example

(App)Program Name

Determines whether the cleaning rule for the named application is enabled.

Note: Any cleaning rules not explicitly defined will use CCleaner default settings.

True - Cleaning Enabled

False - Cleaning Disabled

(App)Temporary Internet Files=False

UsersMethod

Determines whether CCleaner should clean Current, All or Selected Windows user accounts.

0 - Current User only

1 - All Users

2 - Selected Users

UsersMethod=1 

SelectedUsers

Used in conjuction with "UsersMethod = 2" to define the list of Windows user accounts to clean.

User1|User2|UserN

SelectedUsers=User1|User2|User3

CookiesToSave

Determines which cookies CCleaner should not clear as part of the cleaning process 

cookie1|cookie2|cookieN

CookiesToSave=piriform.com|google.com|facebook.com

DelayTemp

If enabled, CCleaner will only delete temporary Windows files older than 48 hours.

0 - Disabled

1 - Enabled

DelayTemp=1

DelayRB

If enabled, CCleaner will only delete files in the Recycle Bin older than 48 hours.

0 - Disabled

1 - Enabled

DelayRB=0

ShutdownAfterClean

Determines if CCleaner will shutdown the system after cleaning.

0 - Disabled

1 - Enabled

ShutdownAfterClean=0

SecureDeleteType

Determines if files will be securely overwritten by the cleaning process.

0 - Normal File Deletion

1 - Secure File Deletion

SecureDeleteType=0

SecureDeleteMethod

Used in conjuction with "SecureDeleteType=1", defines the secure deletion method used.

0 - Simple Overwrite (1 pass)

1 - Advanced Overwrite (3 passes)

2 - Complex Overwrite (7 passes)

3 - Very Complex Overwrite (35 passes)

SecureDeleteMethod=1

Including and Excluding specific files and folders for cleaning

CCleaner can be configured to Include and/or Exclude specified files and folders during the cleaning process. The following parameters can be used in the ccleaner.ini file to allow this.

Parameter Description Available States

Example

IncludeX (e.g. Include1, Include2)

 

Defines files or folders to be included as part of the cleaning process.

Note: Requires "(App)Custom Folders=True" to be defined in ccleaner.ini

 

PATH - for defining specific folder to be included

FILE - for defining specific file to be included

Include1=PATH|C:\Temp\|*.*

Include2=FILE|C:\Temp\|mylog.log

ExcludeX (e.g. Exclude1, Exclude2)

 

Defines files or folders to be included as part of the cleaning process.

Note: Requires "(App)Custom Folders=True" to be defined in ccleaner.ini

 

PATH - for defining specific folder to be excluded

FILE - for defining specific file to be excluded

REG - for defining specific registry entry to be excluded

Exclude1=PATH|C:\Temp\|*.*

Exclude2=FILE|C:\Temp\|mylog.log

Exclude3=REG|HKU\software\piriform