AutoIt Script for Standalone Version 2.16.830

So I was disappointed to find that the /AUTO switch only works on the Cleaner portion of CCleaner. Since I am fluent in AutoIt, I decided to script it. Included is the code to build an AutoIt script for use with the stand alone version of CCleaner (uses ini files instead of registry) which can be found under other downloads from the CCleaner download page. What's nice about the standalone version is that you can make all your selections as to what you want cleaned, then it saves it in an ini file so you can transport it to the next computer. So before you run the script, make sure you have everything checked (or unchecked) that you want cleaned, because you will not get a prompt. Just build the .exe and place in the same directory as ccleaner.exe. It saves a copy of the registry to Documents and Settings before it does any work to the registry. I also disabled user input while it's running, so if it bombs out for some reason, just hit cntl alt delete and manually end the task. Oh, I also added error handling, in case there were no problems to fix, then it would exit normally. Enjoy.

BlockInput(1)run("ccleaner.exe")WinWait("Piriform")WinActivate("Piriform")ControlClick("Piriform", "", "[CLASSNN:Button2]")Sleep(1000)ControlClick("", "This process", "[CLASSNN:Button1]")Do Sleep(1000)Until ControlCommand("Piriform", "", "[CLASSNN:Button2]", "IsEnabled") = 1Sleep(1000)ControlClick("Piriform", "", "[CLASSNN:Button4]")Sleep(1000)ControlClick("Piriform", "", "[CLASSNN:Button2]")Do Sleep(1000)If ControlListView("Piriform", "", "[CLASSNN:SysListView321]", "FindItem", "No issues were found") = -1 Then	Else	WinClose("Piriform")	BlockInput(0)	ExitEndIfUntil ControlCommand("Piriform", "", "[CLASSNN:Button3]", "IsEnabled") = 1ControlClick("Piriform", "", "[CLASSNN:Button3]")Sleep(1000)ControlClick("CCleaner", "", "[CLASSNN:Button1]")Sleep(1000)ControlClick("Save", "", "[CLASSNN:Button2]")Sleep(1000)ControlClick("", "The", "[CLASSNN:Button5]")Sleep(1000)ControlClick("CCleaner", "", "[CLASSNN:Button1]")Do Sleep(1000)Until WinActive("", "The") = 1ControlClick("", "The", "[CLASSNN:Button3]")Sleep(1000)WinClose("Piriform")BlockInput(0)