Jump to content
CCleaner Community Forums

Only one instance of CCleaner running.


Jamin4u

Recommended Posts

Write the code in so only one instance of CCleaner can be running at any given time.

 

Well I'm sure MrG has been used to VB before because CC was first made with VB. In there you can have code that checks if the app is already running.

 

If App.PrevInstance = True Then'CC is already running'stop this app from runningEnd If

 

 

I'm sure there much be some code in C++ that does the same. ;)

Link to post
Share on other sites
Well I'm sure MrG has been used to VB before because CC was first made with VB. In there you can have code that checks if the app is already running.

 

If App.PrevInstance = True Then'CC is already running'stop this app from runningEnd If

 

 

I'm sure there much be some code in C++ that does the same. ;)

 

The good old vb6, That code can fail in vb6, If you was on a Server then you would have

to create a unique mutex

 

No code is needed in vb.net, why i love it.

 

properties - application - and check "make single instance application"

 

c++ how ever is a little more difficult, I believe you must add it to a class,

 

 

sam

Link to post
Share on other sites

NOT WHAT I WANT.

 

I am quite happy that a single instance of code should be restricted to one running process,

But I need one process from each of two instances of code to ANALYZE (separately) and to then compare the results simultaneously. I would not be happy if one process would inhibit the launch of the other instance.

 

I have however no objection to single code instance limiting itself to only run once.

 

I wish to evaluate a new version against the previous version before I use it.

Ccleaner has never done me harm - but Murphy's Law rules supreme so I always look before I leap.

 

I have fixed desktop links to the Portable Version held on my "chosen" drive and folder.

Before I update I download the latest version to an adjacent folder and copy the *.ini files from the "chosen" folder.

 

Then I can launch both versions and ANALYZE - but definitely NOT clean.

Then I can set both Windows to less than full size and compare the results.

 

If the results are the same I assume the latest version is as effective as the previous, and will do no harm, and even though it appears to give no benefit will update in the hope that it will be a bit faster or have a few bugs removed.

 

If the new version has found extra stuff to purge, I will carefully evaluate whether it wants to zap something I really need, and if I am happy I welcome the update.

 

I have not yet observed any reduction in cleaning capability.

 

If I like the latest version, it is then copied to my "chosen" drive and folder that is the target of desktop links

 

Regards

Alan

Link to post
Share on other sites

@Alan_B

 

I understand that you want to compare two different versions of CCleaner side by side.

 

I have however no objection to single code instance limiting itself to only run once.
This is what I was referring to.

 

@All members

 

I have found that if you have CCleaner /Auto as a quick launch and accidentally double click, you will have two instances of the same .exe cleaning simultaneously.

 

 

Could this have negative consequences?

Link to post
Share on other sites
I have found that if you have CCleaner /Auto as a quick launch and accidentally double click, you will have two instances of the same .exe cleaning simultaneously.

 

Could this have negative consequences?

 

I think it might have unexpected consequences - I cannot say what but I would not risk it !

 

I have just launched CCleaner without any arguments and task manager shows

CPU at 60 % during Analysis,

CPU at 40 % during Cleaning.

 

I deduce a small possibility that two processes could simultaneously attempt to delete the same file,

which could be interesting, especially if NTFS file permissions get involved.

 

I use CCleaner /AUTO /SHUTDOWN with 98% success.

About 2% of the time it launches and presumably cleans and closes, but Windows fails to shutdown.

Task Manager shows that about 6 out of 24 processes are no longer running as they normally do.

Once it fails I can invoke it time after time and Windows stays running until I take direct action to shut down.

I assume the first shutdown achieved a 25% success rate at stopping all processes,

and one of the 6 that were closed is vital - without it the other 18 do not get closed.

 

If two instances of CCleaner are racing neck and neck to the final SHUTDOWN,

I would try to remember where I put my BOOT CD ! ! !

 

Alan

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...