Jump to content

Using ccleaner with Cobian backup


John D. Farr

Recommended Posts

Greetings, and thanks for looking into this.

 

I am using Cobian backup (ver 10.1.1.816). Cobian has a nice feature where you can execute a program before backup begins. There are two ways to execute a program. The first is just execute it. Cobian continues after the program starts. The other is "execute and wait." In this case, Cobian is supposed to wait until the executed program terminates before it continues.

 

I have used Microsoft Task Scheduler to create a task called "autocleaner" which executes ccleaner with the /AUTO option and elevated privileges in order to get around being nagged by UAE. This works perfectly. I have added this task to Cobian to be run before backup begins using "execute and wait."

 

Here's the problem. Cobian does not wait for ccleaner to terminate before it presses on with its backup. To compound the problem, Cobian creates a shadow copy of the drive first thing, ensuring that all the trash I wish to delete with ccleaner still goes into my backup.

 

I have successfully used "execute and wait" for other programs without a problem.

 

I would very much appreciate hearing from anyone who has solved this problem!

 

thanks, John

 

Other relevent info

ccleaner ver v3.13.1600 64 bit

Cobian backup ver 10.1.1.816

windows 7 64 bit basic edition

Link to comment
Share on other sites

  • Moderators

I don't use Cobian so cannot really comment on your issue. Only mention I find of Cobian is forum search of posts is this thread

 

http://forum.pirifor...showtopic=12878

 

If no answers here from members perhaps Cobian may have an answer, seen a post here that perhaps you have already noticed

 

http://www.cobiansof...?g=posts&t=4305

 

Support contact

https://support.ccleaner.com/s/contact-form?language=en_US&form=general

or

support@ccleaner.com

 

Link to comment
Share on other sites

  • Moderators

The Problem is you aren't telling cobian to run ccleaner your asking it to run a task. Once that task is finished (the task ONLY consists of launching ccleaner) Cobian continues, you'll need to find a different way to run ccleaner /auto before cobian. perhaps a script that launches a command window the command window then runs ccleaner/auto's task then after auto is down the script shuts down the command prompt and thus the script ends. This script ending can then trigger cobian

 

someone who writes scripts will have to translate to actual work instructions but

 

on run open cmd.exe
echo c:\program files\ccleaner\ccleaner.task
wait
on end close cmd.exe

 

note the above script will only get you errors don't follow the words in it just the idea (I'm sure alan_B will cook up an actual computer script for you, if you wait a bit)

 

 

ADVICE FOR USING CCleaner'S REGISTRY INTEGRITY SECTION

DON'T JUST CLEAN EVERYTHING THAT'S CHECKED OFF.

Do your Registry Cleaning in small bits (at the very least Check-mark by Check-mark)

ALWAYS BACKUP THE ENTRY, YOU NEVER KNOW WHAT YOU'LL BREAK IF YOU DON'T.

Support at https://support.ccleaner.com/s/?language=en_US

Pro users file a PRIORITY SUPPORT via email support@ccleaner.com

Link to comment
Share on other sites

The magic Prefix is

Start /Wait

e.g., on my x64 system I use Portable CCleaner64 in folder H:\Utils\CCleaner\

On my old 32 bit XP I had a *.BAT script that concluded with the lines

START /WAIT H:\Utils\CCleaner\CCLEANER /AUTO
SHUTDOWN2.EXE

Only after CCleaner had completed was the script able to move on to use the third party Shutdown2.exe utility.

(My XP Home had a standard (and hence defective) Shutdown.exe and would only shutdown Windows but not the system when CCleaner arguments were "/AUTO /SHUTDOWN")

 

On 64 bit Windows 7 there are no shutdown problems so I no longer need "Start /Wait"

but it should should work the same with CCleaner64

 

I have just tested by launching CMD.EXE and issued this command

C:\Users\Alan>START /WAIT H:\Utils\CCleaner\CCLEANER64

C:\Users\Alan>

You cannot see it but after the command there was a delay until I closed CCleaner64,

and only after that did I get the "command prompt" that followed.

Link to comment
Share on other sites

  • Moderators

Alan, thank you for you help. The OP isn't trying to shutdown though.

Currently a Task is called by the backup program (the task's PID is killed the second it has performed it's duty)

the issue is that he (IMHO) needs the script to open a command prompt > wait and run ccleaner auto > end ccleaner auto close command prompt

this way the script's PID is the called by the backup program and won't finish until after the clean is done.

 

ADVICE FOR USING CCleaner'S REGISTRY INTEGRITY SECTION

DON'T JUST CLEAN EVERYTHING THAT'S CHECKED OFF.

Do your Registry Cleaning in small bits (at the very least Check-mark by Check-mark)

ALWAYS BACKUP THE ENTRY, YOU NEVER KNOW WHAT YOU'LL BREAK IF YOU DON'T.

Support at https://support.ccleaner.com/s/?language=en_US

Pro users file a PRIORITY SUPPORT via email support@ccleaner.com

Link to comment
Share on other sites

Actually, on XP I needed to shutdown.

 

On Windows 7 I have no such need because of other things I wish to do,

BUT these things should work if I :-

hit the bottom left Windows Start button;

click Run...;

type in the box to the right of Open : "CMD.EXE"

and in the "DOS WINDOW" that opens I can type these commands

H:\Utils\CCleaner\CCleaner64.exe
H:\Utils\CCleaner\CCleaner64.exe /AUTO
START /WAIT H:\Utils\CCleaner\CCleaner64.exe
START /WAIT H:\Utils\CCleaner\CCleaner64.exe /AUTO

The first two commands launch CCleaner, and control instantly returns to CMD.EXE in the "DOS WINDOW",

and meanwhile CCleaner either waits for Analyse etc buttons or instantly cleans and then exits, all depending upon the trailing " /AUTO" argument

The second two commands keep CMD.EXE on hold until CCleaner has not only launched but also completed and been closed.

N.B. I have just confirmed the above work without /AUTO.

I have no intention of risking my new Windows 7 with a blind /AUTO - I want to SEE what is about to go before I suffer regret :)

 

Based on the above, and taking a wild guess that Microsoft Task Scheduler "autocleaner" fails when attempting something like

c:\program files\ccleaner\ccleaner64 /AUTO

You may be lucky if you try

START /WAIT c:\program files\ccleaner\ccleaner64 /AUTO

If that fails then you actually need the scheduler to run

c:\program files\ccleaner\CLEAN.BAT

and add to c:\program files\ccleaner\ a new CLEAN.BAT holding the code

START /WAIT c:\program files\ccleaner\ccleaner64 /AUTO

Link to comment
Share on other sites

  • Moderators

I thing the last part of what Alan put is getting there

 

ADVICE FOR USING CCleaner'S REGISTRY INTEGRITY SECTION

DON'T JUST CLEAN EVERYTHING THAT'S CHECKED OFF.

Do your Registry Cleaning in small bits (at the very least Check-mark by Check-mark)

ALWAYS BACKUP THE ENTRY, YOU NEVER KNOW WHAT YOU'LL BREAK IF YOU DON'T.

Support at https://support.ccleaner.com/s/?language=en_US

Pro users file a PRIORITY SUPPORT via email support@ccleaner.com

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.