Getting CCleaner to run remotely via psexec?

I've been trying to figure out how to remotely ininitate CCleaner on a PC where it has already been installed.

I've experimented with PSEXEC using the following command:

psexec \\ClientPC -i -s "C:\Program Files\CCleaner\CCleaner.exe" /AUTO

CCleaner runs on the remote PC (I can see the tray icon appear then disappear), but it doesn't clean any of the files it is set up to!

I've also tried using the portable version, but have the same problem.

Anyone every try this? http://forum.piriform.com/style_emoticons/default/mellow.gif

-s

Run remote process in the System account .

You cannot use that option, unless your goal is to clean only the system account. (which is pointless)

So you must use:

-u

Specifies optional user name for login to remote computer.

-p

Specifies optional password for user name. If you omit this you will be prompted to enter a hidden password.

For every account you wish to clean.

So, something like this:

psexec \\ClientPC -u user1 -p pass1 -i "C:\Program Files\CCleaner\CCleaner.exe" /AUTO

psexec \\ClientPC -u user2 -p pass2 -i "C:\Program Files\CCleaner\CCleaner.exe" /AUTO

psexec \\ClientPC -u user3 -p pass3 -i "C:\Program Files\CCleaner\CCleaner.exe" /AUTO

I have not tried this.

You cannot use that option, unless your goal is to clean only the system account. (which is pointless)

So you must use:

For every account you wish to clean.

So, something like this:

psexec \\ClientPC -u user1 -p pass1 -i "C:\Program Files\CCleaner\CCleaner.exe" /AUTO

psexec \\ClientPC -u user2 -p pass2 -i "C:\Program Files\CCleaner\CCleaner.exe" /AUTO

psexec \\ClientPC -u user3 -p pass3 -i "C:\Program Files\CCleaner\CCleaner.exe" /AUTO

I have not tried this.

I've actually tried this also (sorry I should have been more thorough in my post) using the Administrator account and password.

For some reason CCleaner runs but does no cleaning.

Hmm, since it only cleans stuff off the user it is running as, I'm very surprised that didn't work.

I suppose maybe you need to set the working directory.

-w

Set the working directory of the process (relative to the remote computer).

Or it just will not work. :(

Hmm, since it only cleans stuff off the user it is running as, I'm very surprised that didn't work.

I suppose maybe you need to set the working directory.

Or it just will not work. :(

Yeah, setting the working directory doesn't work either.

May never work. Thanks for your thoughts.

psexec -i \\XX "C:\Program Files\CCleaner\CCleaner.exe" /AUTO

this works, just tested it

1 thing i noticed, is when you run it like this, it runs under my user profile, not the current logged in user on the remote PC

any ideas how to change that?

i tried the -s switch, but that runs it uder the system account

psexec -i \\* -s "C:\Program Files\CCleaner\CCleaner.exe" /AUTO