CCleaner is one of the most popular freeware applications to clean up your computer, and with good reason – the application is powerful and easy to use. So how do we make a shortcut that runs it in silent mode like the “Run CCleaner” option on the Recycle Bin?
With a command-line switch on a shortcut, of course, which will run the same option as when you right-click on the Recycle Bin:
Of course, not all of us show the Recycle Bin on our desktop, and many of us like to keep the desktop icons hidden most of the time… which is why I’d rather have a shortcut or hotkey somewhere else.
Setup Your Options
You’ll need to decide which settings you want to run when CCleaner is run automatically… for instance, I’d look at whether or not you want to clean out your cookies or recent documents (which is a feature I use often, so I don’t want them cleaned out)
Next, take a trip over to Options \ Advanced and make sure that the “Save all settings to INI file” option is checked (it should be checked by default). This makes sure that whatever settings you’ve chosen are saved out to an INI file in the same directory.
You can even take a look in the file… notice that I turned off recent documents and cookie cleaning, so those are now set to False in the file. (You don’t need to touch this file)
Note: You can use the Options \ Cookies tab to selectively decide which cookies you would like to keep. This is very useful if you would like to continue to be signed in automatically to certain sites, or if your bank has a “Site Key” functionality that remembers your computer.
Create the Shortcut to Automatically Run CCleaner
Right-click on the desktop or elsewhere, and choose New \ Shortcut from the menu.
Next you’ll need to browse to the location of CCleaner on your computer, which will typically be found at the following path (but could be elsewhere).
You’ll want to add the /AUTO switch at the end (make sure to put a space between it), which will typically put the full string as this:
“C:\Program Files\CCleaner\CCleaner.exe” /AUTO
The /AUTO switch will tell CCleaner to run automatically, and not show the GUI. If you are curious what the (x86) in the screenshot path is… I’m running 64-bit Vista, which has one directory for 64-bit programs and another for 32-bit programs.
Once you give the shortcut a useful name like “Run CCleaner”, you should have an icon on your desktop:
You can open up the properties of the icon and also assign a Shortcut key if you’d like. Note that shortcut keys will only work if the icon is in the start menu or desktop, not the quick launch bar.
Now, once you run the shortcut you’ll be prompted with the UAC prompt (if you didn’t disable UAC), and then CCleaner will run silently and clean up your computer.
For extra credit, you could also create a shortcut that doesn’t prompt you for UAC.
Download CCleaner from ccleaner.com (Download the Slim build which doesn’t bundle the Yahoo! toolbar)