Jump to content

Getting CCleaner to run remotely via psexec?


lumpy

Recommended Posts

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

Link to comment
Share on other sites

-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.

They call them fingers, but I've never seen them fing, or ger. WOAH there they go!!!!!!!

~Otto

How to use CCleaner on a Flash Drive (pre v2.0)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. :(

They call them fingers, but I've never seen them fing, or ger. WOAH there they go!!!!!!!

~Otto

How to use CCleaner on a Flash Drive (pre v2.0)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 10 months later...

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.