Kaseya Community

How do you run CCleaner?

  • Hello,

    We are using CCleaner and it works fine when the user  is logged and no web browser is open.

    Now, we would like to schedule this task everytime the user logged in to Windows  (this should work for users in workgroups and domains)  I thought in create a GPO to execute CCleaner.exe  /auto  BUT  I would like to use just Kaseya so I can write into a procedure log every time that the CCleaner script runs. (this will be used to show in the Executive Report to the clients how much work we are doing)

    Is there any way than a Kaseya script can be triggered when the user logged in???    Or should I go to the registry and execute CCleaner HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run ?  But again I dont want to lose writing in a log procedure how many times CCleaner has run.

     

    Any ideas? how you execute CCleaner?

     

    p.s. I dont want to use the option when the agent checks in, because again CCleaner does not work if any user is logged.

  • This is definitely something I would be interested in as well.

    Just using the information that ccleaner already displays at the end of the report into a text file, to see inside of executive summary would be great.

  • You can run CCleaner via script, scheduled and have it check whether or not a user is logged in, I don't recall what the command is to out put the log file is but it is doable. 

    Personally I do not use CCleaner because it is user dependant, I use something called cleanup.exe (I'm not saying its "the best" but it works for me) to and it cleans all user profiles.  There is another app out there that a lot of folks use that works quite well also although I'm not sure of its name.  If you want I'll go track it down.

    If you decide to go the registry route, you'll want to put that in HKEY_CURRENT_USER\SOftware\Microsoft\Windows\CurrentVersion\Run and not HKLM so that it fires when the user logs in. Be mindful that this may increase login times...

  • hey thirtytwenty, is that by any chance Steven Gould's Cleanup you are using? If so, how do pre-configure the scan options in your procedure?

    ie. running "cleanup.exe -auto" on a new PC prompts the user to run in demo mode first

  • you should search the forum/knowledgebase/resources. Somewhere there is a script to download. The ccleaner settings can be done through the ini file. I used this also and runs fine.

  • Hi all,

    back again...

    I have been implementing Ccleaner with some clients already here is the script that works pretty well , you just need to customize the ccleaner.ini file according to what features you choose for the client.  (Bare in mind this runs ok for 32 bits, for 64 bits you need to modify the path to copy the ccleaner.ini)

    ---------------------------------------------------------

    Install and set Ccleaner

    ---Write file VSASharedFiles\ccsetup304.exe to c:\temp\ccsetup304.exe

    ---Pause this procedure for 120 seconds to give a previous action time to complete

    ---Execute c:\temp\ccsetup304.exe /s as Execute as the system account without waiting

    ---Pause this procedure for 120 seconds to give a previous action time to complete

    ---Write file VSASharedFiles\ccleaner.ini to c:\Program Files\Ccleaner\ccleaner.ini

    IF Registry Path Value HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Current Version\Run\CCleaner  Does Not Exist

    Set registry patch HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Ccleaner of datatype REG_SZ  to value c:\Program Files\CCleaner\ccleaner.exe /auto

    --------------------------------------------------------------

    I am still working on a way to pull this information into the Exec Summary. Because Ccleaner runs everytime any user logs in, it is troublesome to  count how many times it has run.

    So now I will just show a table in the Exec Summary to show how many machines have Ccleaner install (work in progress)  So every machine that has Ccleaner installed is running properly.

    But I was wondering How do you run Ccleaner, let me put it in this way: You have  several clients (companies)   I explained to the main contact for each client what will Ccleaner do  and what features do they want to have. So I ended up with several different ccleaner.ini   (according to each client needs)  ok no big deal.

    The problem was that with a couple of users (the owner)  Ccleaner deleted some features that they didn't want to... so they got upset and cancel the maintenance... How do you prevent this? I sent an email, talked to the main contact. I think I did the right things but now those 2 clients are kind of upset about it.

    It was supposed to be just a proactive maintenance task.

    Any comments and/or suggestions?

  • @marcusakarufio

    Yes, that is how I do it, there is a registry setting that needs to be set so that it does not run in demo mode first.  If it's not in the downloads section let me know and I'll post it here.

  • @anbant

    FYI you don't need to install CCleaner on the client, you can just copy the exe and ini files locally and run in in auto mode. I leave the exe on the machine and just push the ini each time in case I have modified a setting.

    It only runs on the current user profile as you know, so I use check  IF user logged in...

    Steven Gould's Cleanup! on the on the hand, cleans up all user's profiles so I might switch to using that

    @thirteentwenty

    Thanks, I found the reg entry required in another thread and it works well

    For those interested -> community.kaseya.com/.../28866.aspx

  • @marcusakarufio,

    yes Ccleaner is running fine, I can clean any profile  because CCleaner will always run at startup. That has been working perfect :)

    But now, I find some clients that doesn't want to have the google toolbar installed. It is weird in my tests here in the office it  was not install but now it does.....

    I have been spending the last hour reading the Piriform Ccleaner Forum, trying to find out a way to not have the google toolbar installed but nothings appears yet.

    Does anyone of you have found a way to not having google toolbar installed?

  • @anbant

    use a pro account from www.ninite.com to install and update apps without toolbars - its an excellent service

  • @marcusakarufio

    Thank you for the link!!!  Let's see how it works :)