Scripting CCleaner Business Edition installation and operation

CCleaner Business Edition is fully scriptable. The command line parameters can be used in batch files, scripting, shortcuts, or the Task Scheduler to automate CCleaner. For example, you could set CCleaner to run automatically every day at 3:00am.

Installation using scripts

Parameter Explanation Example
ccsetup.exe /S

This performs a silent install of CCleaner with default options.

Note for activation, you will require the MSI installer from here.

ccsetup.exe /S
ccsetup.exe /D=<pathname> This installs CCleaner into a different folder than the default. ccsetup.exe /D=C:\Directory
(In this example, CCleaner would be installed in the C:\Directory folder.)
ccsetup.exe /L=<locale> This installs CCleaner with a language file identified by the locale ID. For a list of locale IDs, see http://support.microsoft.com/kb/221435. For a list of CCleaner's supported languages, see this topic. ccsetup.exe /L=1036
(In this example, CCleaner would be installed in French.)

Note: You can use multiple parameters by including them on the same line. For example:

ccsetup.exe /S /D=C:\CCleaner /L=1031

This switch would install CCleaner silently in German to the C:\CCleaner folder.

 

Operation using scripts

Parameter Explanation Example
/auto CCleaner runs silently and automatically, using the current set of saved options to clean the PC. CCleaner then exits. ccleaner.exe /auto
/auto /shutdown CCleaner runs silently and automatically, using the current set of saved options to clean the PC. Windows then shuts down automatically..
Note: You cannot run /SHUTDOWN by itself. It must be preceded by /AUTO.
ccleaner.exe /auto /shutdown
/export CCleaner exports the cleaning rules to the INI files. Three INI files will be created in the CCleaner's installation folder - winapp.ini, winreg.ini and winsys.ini. They contain cleaning rules for the Application section, Registry Cleaner and the Windows section respectively. ccleaner.exe /export
/analyze ["log_filename.txt"] Analyses using the rules defined in ccleaner.ini and puts the results in log_filename.txt ccleaner.exe /analyze "log.txt"
/clean ["log_filename.txt"] Cleans using the rules defined in ccleaner.ini and puts the results in log_filename.txt ccleaner.exe /clean "log.txt"
/update Performs an immediate silent update. ccleaner.exe /update

Note 1: If you are using a 64 bit system, simply substitute ccleaner.exe with ccleaner64.exe for the above commands.

Note 2: When you run CCleaner.exe using the /AUTO parameter, CCleaner does not run the Registry cleaner. You cannot currently run the Registry cleaner through a command-line parameter

 

UI control

CCleaner has four 'panes': Cleaner, Registry, Tools, and Options. When the program is open, you can access each pane by clicking the associated icon/button at left.

If you are launching CCleaner from a command line, you can now have it open on a particular pane by specifying one of the following command-line switches:

  • /CLEANER
  • /REGISTRY
  • /TOOLS
  • /OPTIONS

If CCleaner is already open, it will display the appropriate pane. If you have more than one instance of CCleaner running, the command-line switch will only affect the topmost (if open) or left-most (if minimized) instance.

Note: CCleaner will only recognize the first pane-related command-line switch.