Not the best, most thorough solution but Priform CCleaner has a portable version. I've used this before in a task to run the default cleanup from the single executable.
Thanks for the suggestion. Can it run silently?
Yep, as AHE suggests, check out the website for all of the switches, but here is a quick copy paste of a much larger vbs that I use to fire it off...
subDisplay "Running CCleaner." strCmd = "C:\MigTemp\ccleaner.exe /auto" '(You can change this to the sdmcache folder)
Set oExec = wshShell.Exec(strCmd)
Do While oExec.Status = 0
wscript.StdOut.Write " .. "
Loop 'Do until job is finished
subDisplay "Cleanup Complete! - Exiting script."
If Instr(1, WScript.FullName, "cscript.exe", vbTextCompare) > 0 Then
const ForAppending = 8
strLogFile = "c:\Cleanup.log"
Set FileSys = CreateObject ("Scripting.FileSystemObject")
set objFile = FileSys.OpenTextFile(strLogFile, ForAppending, True)
WScript.Echo strOutput & vbCrLf objFile.WriteLine(Time & " " & strOutput)
objFile.Close Else WScript.Echo strOutput