Command-line parameters for CCleaner for Windows

This page explains what command line parameters are and how to use them to change how you install or run CCleaner. It also contains technical information about programming code. If you are unfamiliar with code, this page may not be suitable for you. Here are the topics covered on this page:

Note: This page's content is aimed at advanced users of our app and may require a certain level of technical knowledge and expertise.

What are the command-line parameters?

These are commands that are supplied to a program when it's launched. It is often used if you need to control an app from the outside. To summarize, it's a specific type of coding. 

Command-line parameters for CCleaner installs:

There are three parameters you can use when installing CCleaner. You can use them in batch files to automate how CCleaner installs on your computer.

Parameter

Explanation

Example

ccsetup.exe /S

This installs CCleaner silently with default options.

ccsetup.exe /S

ccsetup.exe /D=<pathname>

This installs CCleaner into a different folder than the default folder.

ccsetup.exe /D=C:\Directory

(In this example, CCleaner is installed in the C:\Directory folder.)

ccsetup.exe /L=<locale>

This installs CCleaner with a language file identified by the locale ID.

Please see the list of locale IDs. You can also view the list of CCleaner's supported languages.

ccsetup.exe /L=1036

(In this example, CCleaner is installed in French.)

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

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

installs CCleaner silently in French in the C:\CCleaner folder.

Command-line parameters for running CCleaner:

There are three parameters you can use when running CCleaner. You can use them in batch files, scripting, shortcuts, or the Task Scheduler to automate how CCleaner operates.

For example, you could set CCleaner to run automatically every day at 3:00 am.

Parameter

Explanation

CCleaner.exe /AUTO

This command runs CCleaner silently and automatically, using the current set of saved options in Custom Clean to clean the PC. CCleaner then exits.

CCleaner.exe /AUTO /SHUTDOWN

This command runs CCleaner silently and automatically, using the current set of saved options in Custom Clean to clean the PC. Windows then shuts down automatically.

Note: You cannot run /SHUTDOWN by itself. It must be preceded by /AUTO.

CCleaner.exe /EXPORT

CCleaner exports the cleaning options to the INI files. Three INI files get created in the CCleaner's installation folder - winapp.ini, winreg.ini, and winsys.ini. These contain cleaning options for the Application and Windows section within Custom Clean (and the Registry Cleaner.) They are intended for reference only, as the software does not respect changes made to these .INI files. Make changes to CCleaner’s rules via INI.

CCleaner.exe /DELETE "path_to_file(s)" /METHOD "0-3"

CCleaner securely deletes the specified folders/files.

You can specify multiple files/folders and separate them with the "|" character.

Example:

CCleaner.exe /delete

"D:\Temp\SDelete*.*|

D:\Temp\SDelete*.log|D:\Temp\SDelete*.txt|

D:\Temp\SDelete\test.bmp"

The Method parameter defines the secure deletion type:

0 - 1 Pass

1 - 3 Passes

2 - 7 Passes

3 - 35 Passes

Note: You cannot use /METHOD by itself. It must be preceded by /DELETE.

 

Note: When you run CCleaner.exe using the /AUTO parameter, CCleaner does not run the Registry Cleaner in Registry > Registry Cleaner. You can't run the Registry Cleaner through a command-line parameter.

Command-line parameters for running CCleaner (the 5 main options):

CCleaner currently has five selectable options (shown as icons) that act as its main menu. These appear as a menu on the left-hand side of the CCleaner app window when it's open. 

  • Health Check
  • Custom Clean
  • Registry
  • Tools
  • Options

Click each option to access the associated icon/button at the left.

If you launch CCleaner from a command line, you can also open it in a particular window by specifying one of the following command-line switches:

  • /CLEANER (Opens Health Check or Custom Clean depending on which you have set as default)
  • /REGISTRY
  • /TOOLS
  • /OPTIONS

If CCleaner is already open, it displays the appropriate window. If you have more than one part of CCleaner running at once, the command-line switch only affects the topmost part (if open) or left-most (if minimized) part.

Note: CCleaner only recognizes the first window-related command-line switch.

Need to find your product license key?

Go to our license lookup page and enter your registered email address to retrieve info about your products, including product download links, license key(s), and expiry dates.

Send me my license details

Articles in this section