CCleaner - Fails to run with /AUTO

(imported topic written by SystemAdmin)

Has anyone been successful getting CCleaner to run with its /auto switch? We can get it to run without the switch, but with the switch it never actually runs.

Actionscript:

prefetch ccsetup235.tmp sha1:b18b2a460f381dc129308c8fc0eb697879f2257a size:1192278 http://bigfixserver:52311/Uploads/b18b2a460f381dc129308c8fc0eb697879f2257a/ccsetup235.tmp
 
extract ccsetup235.tmp
 
waithidden __Download\ccleaner.exe /auto

We’ve also tried enclosing the waithidden line in quotes, providing the path of client folder of current site, etc. If we remove the /auto it works, but not silently.

(imported comment written by SystemAdmin)

Here’s the task i created to do this very thing… Copy “code” to a file ending with .bes, then double click it to import into your deployment.

<?xml version=
"1.0" encoding=
"UTF-8"?> <BES xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=
"BES.xsd"> <Task> <Title>CCleaner::Scan/Clean Endpoint Version 3.02</Title> <Description>This task is designed to run the CCleaner that was previously installed in order to cleanup a computer. </Description> <Relevance>name of operating system contains 
"Win"</Relevance> <Relevance>

if exists regapps whose (name of it contains 
"CCleaner") then exists file (pathname of regapps whose (name of it contains 
"CCleaner")) 

else false</Relevance> <Category>CCleaner</Category> <Source>Moran IT</Source> <SourceID></SourceID> <SourceReleaseDate>2010-12-29</SourceReleaseDate> <SourceSeverity></SourceSeverity> <CVENames></CVENames> <SANSID></SANSID> <MIMEField> <Name>x-fixlet-modification-time</Name> <Value>Thu, 30 Dec 2010 01:40:52 +0000</Value> </MIMEField> <Domain>EPP </Domain> <DefaultAction ID=
"Action1"> <Description> <PreLink>Click </PreLink> <Link>here</Link> <PostLink> to deploy 

this action.</PostLink> </Description> <ActionScript MIMEType=
"application/x-Fixlet-Windows-Shell">parameter 
"scanner"=
"{pathname of regapps whose (name of it contains "CCleaner
")}"   
//make sure nothing has changed before executing it... don't want a virus to replace this file just before we kick it off 

if 
{parameter 
"scanner" contains 
"64"
} 

continue 

if 
{(sha1 of it = 
"0dd08a236f96a098baa6010d9e3e91c9785e68a6" and size of it = 3391288) of file (parameter 
"scanner"))
} 

else 

continue 

if 
{(sha1 of it = 
"7cd608ce362ba6f495299fa716cdf6631e73b8bc" AND size of it = 2162488) of file (parameter 
"scanner"))
} endif   run 
"{parameter "scanner
"}" /AUTO </ActionScript> <SuccessCriteria Option=
"RunToCompletion"></SuccessCriteria> </DefaultAction> </Task> </BES>

(imported comment written by SystemAdmin)

Dreadging this up from the depths…

So I finally got back to trying this and… you need to run CCleaner as the current user. Ok, so we are trying this in actionscript:

prefetch RunAsCurrentUser.exe sha1:ee47505ebfb2790b9da8a20ed70e67158e9753d0 size:342528 http://software.bigfix.com/download/bes/util/RunAsCurrentUser-2.0.3.1.exe 
utility __Download\RunAsCurrentUser.exe 
 
prefetch ccsetup307.tmp sha1:43a5cb13c1d61210632b4fd476475216a8f15934 size:2786571 http://bigfixserver.domain.local:52311/Uploads/43a5cb13c1d61210632b4fd476475216a8f15934/ccsetup307.tmp 
extract ccsetup307.tmp 
 
waithidden "{(pathname of client folder of current site) & "\__Download\RunAsCurrentUser.exe"}" --w "{(pathname of client folder of current site) & "\__Download\ccleaner.exe /auto"}"

And nothing happens. So we tried just running the following from a command line:

RunAsCurrentUser.exe --w: CCleaner64.exe

and

RunAsCurrentUser.exe --w: CCleaner64.exe /auto

And nothing happens. Shouldn’t we see ccleaner running in the task list? Just running the following works as expected:

CCleaner64.exe /auto

Just for fun, we tested running notepad.exe with runascurrentuser.exe and had the same results. Right now we are testing on Win7 64bit using runascurrentuser version 2.0.3.1.

(imported comment written by SystemAdmin)

Does it work if you set the BESclient service to interactive mode? waithidden cmd /C sc config besclient type= own type= interact