Jump to content
CCleaner Community Forums
Alan_B

Winapp2.ini on skates - making it 40 times faster.

Recommended Posts

The latest 162 KB WinApp2.ini causes a 4140 mSec assimilation delay before CCleaner is ready for action.

Without WinApp2.ini then CCleaner needs only 350 mSec before being ready for action - but it is less comprehensive.

A minimized 12 KB variant gives a mere 100 mSec Assimilation delay, and cleaning is just as good as the 162 KB variant.

 

TRIM.BAT takes less than 3 seconds to produce the 12 KB variant, and is attached as TRIM.TXT to comply with attachment restrictions.

UNFORTUNATELY it depends upon CCleaner.INI showing all the CCleaner.exe detections of applications,

and that needs perhaps 1 minute of double clicking groups of CCleaner checkboxes to force needed information into CCleaner.ini.

 

Please advise me If you know of a Windows GUI to text capture tool such as Nirsoft SysExp,

but with command line options.

If CCleaner /debug could be enhanced to show all detected applications,

life would be much sweeter.

 

Trim_Help.txt describes the actions needed to force needed information into CCleaner.ini.

 

LaunchCC.BAT is attached as LaunchCC.txt and measures the duration of CCleaner(64).exe /AUTO

and show how much faster a launch is using the reduced WinApp2.ini

 

Trim_Log.txt was captured from the screen when using the above tools

 

 

I FORGOT TO SAY - PLEASE NOTE :-

THIS intended to run in a folder dedicated to the purpose of creating a minimized WinApp2.ini.

It is intended also to demonstrate the speed of a "CCLEANER /AUTO " operation with all boxes unchecked so nothing is zapped.

This has no effect upon the check-boxes / saved cookies / Includes / Excludes for your normal CCleaner configuration.

 

Your "normal" CCleaner gains the benefit when you replace its standard WinApp2.ini with the minimized version.

My "normal" CCleaner is Portable and held in partition H:\ with other Portable tools and applications,

but the same MAXI Winapp2.ini works for both portable and installed versions of CCleaner,

so the MINI version should be just as compatible.

LaunchCC.txt

Trim.txt

Trim_HELP.txt

Trim_Log.txt

Edited by Alan_B

Share this post


Link to post
Share on other sites

This is overly complex.

 

 

 

The Winapp2.ini thread already states that those who feel the slow load time is not worth it (and also the majority of users) ought to use the file as a template and not as a whole.

 

However, this thread and trim file may indeed be of some interest to some, so I for one will keep the thread here (other moderator's opinions however may differ from mine)

Share this post


Link to post
Share on other sites

Thanks Alan, I've tested it on my machine and it does a fine job of detecting all of the correct installations :)

Share this post


Link to post
Share on other sites

Thanks, Alan!

 

I have not tested it, but it looks like it would work.

Thank you for trying it for me, WinApp2.ini

 

:) I was working & didn't have time

Share this post


Link to post
Share on other sites

what is the proper way to "TRIM" a new INI file after an update? Can you just simply just drop the new INI file in the CCleaner folder and run TRIM.BAT?

Share this post


Link to post
Share on other sites

This is overly complex.

I would prefer to say that what it achieves is complex, but user involvement is simple,

Unfortunately it is tedious getting CCleaner to show which applications it can detect.

 

MASSIVE IMPROVEMENT NOW :-

 

Version 2 only requires you to press the "Analyze" button and after Analysis is done to then close CCleaner.

 

On my machine it takes less than 30 seconds to convert a 163 kB file down to 12 kB

 

None of the previous 4 files are needed.

Just download and rename Trim_2.txt as Trim_2.bat and you are good to go.

 

N.B. This version includes extra debug diagnostics and sanity validation checks.

My system has both 55 and 57 application detections due to the "double check"

I found the cause was an unexpected feature in the downloaded WinApp2.ini

There were two Application Blocks sharing the same identical header name of

[Adobe Flash Install Logs*]

My code now identifies the number of Config Blocks and the number of Unique Names.

Functionality was not affected.

 

Regards

Alan

Trim_2.txt

Share this post


Link to post
Share on other sites

to note, I've changed my opinion on this based on the fact the community seems to support & like this idea/script. (yes I am a windsock when it comes to things like this ;) )

Share this post


Link to post
Share on other sites

Is the "trim_2.bat" file just placed in the CCleaner folder? If that's the correct procedure, it didn't seem to work on my XP SP3 system.

Share this post


Link to post
Share on other sites

Is the "trim_2.bat" file just placed in the CCleaner folder? If that's the correct procedure, it didn't seem to work on my XP SP3 system.

if you're running it in an installed version of ccleaner (instead of a portable version) you must have (I believe) save settings to ini file loaded

 

however I think alan left out calling cleaner /debug I only see him calling ccleaner64 in it

Share this post


Link to post
Share on other sites

Is the "trim_2.bat" file just placed in the CCleaner folder? If that's the correct procedure, it didn't seem to work on my XP SP3 system.

No, sorry, At the beginning of the script I should have stipulated that the new empty folder is the home for Trim_2.bat

ECHO Method :- Create an empty folder and add Winapp2.ini plus Unzip Portable CCleaner

 

I cannot predict the consequences of using either the original or the latest version in an existing folder.

It may do nothing, or it may require correction and even removal and fresh installation of CCleaner.

 

This is only intended to "go ape" in its own private folder where it can do no harm to any existing CCleaner.

When it has done its job you have a "trimmed" WinApp2.ini and only this Winapp2.ini should be moved to where-ever you "normal" version lives.

 

I intended to add x32/x64 bit detection before posting,

but forgot due to suffering brain fade from anomalies and surprises that came from the main 163 kB WinApp2.ini download file.

 

What has been posted will only work on x64 because it invokes

CCLEANER64 /DEBUG

 

I will post a corrected version later - possibly this evening.

Share this post


Link to post
Share on other sites

if you're running it in an installed version of ccleaner (instead of a portable version) you must have (I believe) save settings to ini file loaded

That was true for the previous version, but Trim_2 does not depend on it.

 

But it is NOT ADVISABLE to have any involvement with a non-Portable version.

What happens in Vegas stays in Vegas

What happens in Portable stays in Portable - delete the folder and it is gone

What happens in Registry is a permanent infection you cannot shake off, and affects any INSTALLED CCleaner.

 

however I think alan left out calling cleaner /debug I only see him calling ccleaner64 in it

Sorry, I intended to get that fixed with an auto-detect but forgot.

 

This screen snapshot demonstrates the anomalies that took my attention

Purpose :- To greatly reduce CCleaner.exe start-up delay by Minimizing WinApp2.ini.

Method :- Create an empty folder and add Winapp2.ini plus Unzip Portable CCleaner.

TECHNIQUE :- You launch TRIM_2. CCleaner appears. Click "Analyze" and when done close CCleaner

A temporary Winapp2.ini variant is created that asserts "Default=True".

"CCLeaner /Debug" is launched to obtain a *.log file that identifies all "Detections"

You then have to wait for the "Analyze" button to become active and click it,

and after analysis you close CCleaner so this script may procede to recreate WinApp2.ini.

 

21:28:18.87 - 21:28:16.61 = 7729887 - 7729661 = 2260 mSec = Created WINAPP2_TRUE.INI

COUNTED Imported WINAPP2.INI has 678 Configuration blocks

 

About to launch CCleaner.

YOU MUST NOT "Run Cleaner" - ONLY Click "Analyze"

Then please CLOSE CCleaner so script may continue.

Hit "Enter" key when ready to proceed ...

 

21:28:41.37 - 21:28:20.04 = 7732137 - 7730004 = 21330 mSec = Running "CCLEANER64 /DEBUG"

21:28:41.41 - 21:28:41.38 = 7732141 - 7732138 = 30 mSec = Created DEBUG.LST

21:28:41.51 - 21:28:41.43 = 7732151 - 7732143 = 80 mSec = Created 54 off BID_nnnn

CREATING NEW WINAPP2.INI

21:28:44.27 - 21:28:41.51 = 7732427 - 7732151 = 2760 mSec = NEW WINAPP2.INI Creation.

Counted 56 Config Blocks and 54 Unique names

Press any key to continue . . .

 

I can only count 678 blocks, but the download file claimed

; # of entries: 679

 

I was shattered by investigating why :-

 

1.

Trim_2 could only count 678 configuration blocks whilst the original file claimed

; # of entries: 679

 

If you alter the second line of my script to

SET /A DEBUG=1

Then the output files will include extra comments, including in WinApp2_TRUE.ini an incrementing count after every "Default=", concluding with

[ZX32 ZX Spectrum Emulator v1.03*]

LangSecRef=3021

Detect=HKCU\Software\VK\zx32\1.03

Default=True

; --------------678-----------

RegKey1=HKCU\Software\VK\zx32\1.03\FileMRU

 

2.

Two different counts by Trim_2 of its output gave two different answers and apparently contradictory answers of 57 and 55.

After investigation I found the anomaly in the download file which uses the same name for both the x32 and x64 variants of

[Adobe Flash Install Logs*]

Hence I now show where different numbers come from with

Counted 57 Config Blocks and 55 Unique names

 

PLEASE NOTE THE DEBUG OUTPUT FILES ARE NOT USABLE

It encapsulates the intended output with {} so that any trailing (invisible) spaces become immediately visible,

but all such files are unusable to CCleaner.exe

 

Incidentally the x32 variant of [Adobe Flash Install Logs*] uses

DetectFile=%WinDir%\System32\Macromed\Flash|FlashInstall.log

Default=False

FileKey1=%WinDir%\System32\Macromed\Flash|FlashInstall.log

 

I have used the new trimmed WinApp2.ini for a real purge of all CCleaner could find.

I observe that both variants are still detected by CCleaner, so I guess there is still some FlashInstall.log that is still detected,

but since my post #9 when I reported

My system has both 55 and 57 application detections

I now find that a re-run of Trim_2 finds

Counted 56 Config Blocks and 54 Unique names

 

I guess there are quite a few instances where what is detected is then deleted and is no longer visible as a checkbox to enable or disable.

 

Tomorrow I will post Trim_3 with x32/x64 capability and hopefully a better understood description of how to use it.

Share this post


Link to post
Share on other sites

The attached should now work for x32 and x64 machines

I think have now resolved all the "anomalies" caused by the Winapp2 "features" of :-

Entries written in UNIX (0x0a) style instead of DOS (0x0d, 0x0a) style;

Trailing spaces at the end of some lines; and

Use of the same [configuration block name*] for more than one configuration block.

 

I have enhanced the built-in documentation.

Please do NOT use previous documentation.

 

The following was captured from my DOS window when I ran the script and dir directory listings.

 

The script creates many #_????? files as part of the "work in progress"

They are not the end product, which is only the new trimmed WinApp2.ini.

The #_DEBUG_???? files are what I used to identify and overcome anomalies,

and may be useful for anyone interested in observing and fixing the full sized Winapp2.ini

 

E:\T\CCleaner\v313\T5>DIR /A:-D
Volume in drive E is E_GPT_E
Volume Serial Number is C044-40A5

Directory of E:\T\CCleaner\v313\T5

27/12/2011  07:57		 4,555,072 CCleaner64.exe
03/12/2011  17:42			 5,788 License.txt
03/12/2011  17:42				10 portable.dat
31/12/2011  12:05			 4,299 Trim_3.bat
27/12/2011  07:56		   166,739 winapp2.ini
		   5 File(s)	  4,731,908 bytes
		   0 Dir(s)  99,231,690,752 bytes free

E:\T\CCleaner\v313\T5>TRIM_3
FILE CREATION 12:05 31/12/2011

DO  NOT  USE  THIS  WITH  AN  EXISTING  CCLEANER  IN  CASE  YOU  CORRUPT  IT

Make a new folder for this script plus PORTABLE CCleaner plus downloaded WinApp2.ini.
This script will create a trimmed WinApp2.ini giving a faster launch for CCleaner.

TECHNIQUE :-
Run TRIM_2. CCleaner appears. Click "Analyze" and when done close CCleaner
A temporary Winapp2.ini variant is created that asserts "Default=True".
"CCleaner /Debug" is launched to obtain a *.log file to identify all "Detections"
You then have to wait for the "Analyze" button to become active and click it.
After analysis close CCleaner, then trimmed Winapp2.ini replaces the "Default=True".
Now copy the trimmed WinApp2.ini to your normal CCleaner installation.

12:09:06.35 - 12:09:04.02  = 4374635 - 4374402  = 2330 mSec	 = Built #_TRUE_WINAPP2.INI
COUNTED Imported WINAPP2.INI has 678 Configuration blocks
12:09:08.70 - 12:09:06.36  = 4374870 - 4374636  = 2340 mSec	 = Built #_DEBUG_TRUE_WINAPP2.INI
COUNTED Imported WINAPP2.INI has 678 Configuration blocks

   About to launch CCleaner.
 YOU  MUST  NOT  "Run Cleaner"  -  ONLY  Click "Analyze"
 Then please CLOSE CCleaner so script may continue.
Hit "Enter" key when ready to proceed ...

12:09:20.57 - 12:09:11.07  = 4376057 - 4375107  = 9500 mSec	 = Running "CCLEANER{64} /DEBUG"
12:09:20.63 - 12:09:20.57  = 4376063 - 4376057  = 60 mSec	   = Built #_NEEDED.LST
12:09:20.73 - 12:09:20.63  = 4376073 - 4376063  = 100 mSec	  = Built 55 off BID_nnnn

CREATING NEW WINAPP2.INI
12:09:23.54 - 12:09:20.73  = 4376354 - 4376073  = 2810 mSec	 = NEW WINAPP2.INI
Counted 57-2 = 55 Config Blocks with 2 Repetition Anomalies

CREATING NEW #_DEBUG_WINAPP2.INI
12:09:26.34 - 12:09:23.55  = 4376634 - 4376355  = 2790 mSec	 = NEW #_DEBUG_WINAPP2.INI
Counted 57-2 = 55 Config Blocks with 2 Repetition Anomalies

#_DEBUG_TRUE_WINAPP2.INI.TXT shows 49 Lines with a trailing space

#_DEBUG_WINAPP2.INI.TXT shows 7 Lines with a trailing space
Press any key to continue . . .

E:\T\CCleaner\v313\T5>DIR /A:-D
Volume in drive E is E_GPT_E
Volume Serial Number is C044-40A5

Directory of E:\T\CCleaner\v313\T5
[font=courier new,courier,monospace]
31/12/2011  12:09		   209,863 #_DEBUG_TRUE_WINAPP2.INI
31/12/2011  12:09			 3,078 #_DEBUG_TRUE_WINAPP2.INI.TXT
31/12/2011  12:09			17,486 #_DEBUG_WINAPP2.INI
31/12/2011  12:09			   576 #_DEBUG_WINAPP2.INI.TXT
31/12/2011  12:09		   166,747 #_DOS_WINAPP2.INI
31/12/2011  12:09			 4,006 #_NEEDED.LST
31/12/2011  12:09		   166,045 #_TRUE_WINAPP2.INI
27/12/2011  07:56		   166,739 #_V0_WINAPP2.INI
31/12/2011  12:09			   129 ccleaner.ini
27/12/2011  07:57		 4,555,072 CCleaner64.exe
31/12/2011  12:09			45,550 CCleaner64_31-12-2011_12-9-11.log
03/12/2011  17:42			 5,788 License.txt
03/12/2011  17:42				10 portable.dat
31/12/2011  12:05			 4,299 Trim_3.bat
31/12/2011  12:09			12,431 WINAPP2.INI
		  15 File(s)	  5,357,819 bytes
		   0 Dir(s)  99,231,043,584 bytes free[/font]

E:\T\CCleaner\v313\T5>

Trim_3.txt

Share this post


Link to post
Share on other sites

Alan...found a problem. I have hoth x86 and x64 in the same folder and I get this error:

This version of D:\APPS\CCleaner\TRIM_INI\CCleaner64.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.

 

Maybe you can do something like this in the BAT file:

IF EXIST "%WINDIR%\SysWOW64" start /wait CCleaner64.exe
IF NOT EXIST "%WINDIR%\SysWOW64" start /wait CCleaner.exe

 

Also...the program continues and does not abort after trying to run x64 file on an x86 system.

Share this post


Link to post
Share on other sites

Let me add another error to the x86 version. The portable version has CCleaner.exe and CCLeaner64.exe not CCleaner32.exe

'CCLEANER32' is not recognized as an internal or external command, operable program or batch file.

Share this post


Link to post
Share on other sites

ARGHHHHH...should have tested it all before making my 1st port. Anyway, another error on an x86 system....looks like it's running CCLEANER x64....or at least that's what it says:

 

This is the output on the screen

 

FILE CREATION 12:05 31/12/2011
   DO  NOT  USE  THIS  WITH  AN  EXISTING  CCLEANER  IN  CASE  YOU  CORRUPT  IT
Make a new folder for this script plus PORTABLE CCleaner plus downloaded WinApp2.ini.
This script will create a trimmed WinApp2.ini giving a faster launch for CCleaner.
TECHNIQUE :-
Run TRIM_2. CCleaner appears. Click "Analyze" and when done close CCleaner
A temporary Winapp2.ini variant is created that asserts "Default=True".
"CCleaner /Debug" is launched to obtain a *.log file to identify all "Detections"
You then have to wait for the "Analyze" button to become active and click it.
After analysis close CCleaner, then trimmed Winapp2.ini replaces the "Default=True".
Now copy the trimmed WinApp2.ini to your normal CCleaner installation.
14:22:37.28 - 14:22:34.82  = 5175728 - 5175482  = 2460 mSec	 = Built #_TRUE_WINAPP2.INI
COUNTED Imported WINAPP2.INI has 678 Configuration blocks
14:22:40.01 - 14:22:37.30  = 5176001 - 5175730  = 2710 mSec	 = Built #_DEBUG_TRUE_WINAP
P2.INI
COUNTED Imported WINAPP2.INI has 678 Configuration blocks
   About to launch CCleaner.
 YOU  MUST  NOT  "Run Cleaner"  -  ONLY  Click "Analyze"
 Then please CLOSE CCleaner so script may continue.
   Hit "Enter" key when ready to proceed ...
14:23:09.57 - 14:22:43.16  = 5178957 - 5176316  = 26410 mSec    = Running "CCLEANER{64} /DEBUG"
14:23:09.75 - 14:23:09.59  = 5178975 - 5178959  = 160 mSec	  = Built #_NEEDED.LST
14:23:09.94 - 14:23:09.77  = 5178994 - 5178977  = 170 mSec	  = Built 65 off BID_nnnn
CREATING NEW WINAPP2.INI
14:23:16.76 - 14:23:09.98  = 5179676 - 5178998  = 6780 mSec	 = NEW WINAPP2.INI
Counted 67-2 = 65 Config Blocks with 2 Repetition Anomalies
CREATING NEW #_DEBUG_WINAPP2.INI
14:23:23.90 - 14:23:16.78  = 5180390 - 5179678  = 7120 mSec	 = NEW #_DEBUG_WINAPP2.INI
Counted 67-2 = 65 Config Blocks with 2 Repetition Anomalies
#_DEBUG_TRUE_WINAPP2.INI.TXT shows 49 Lines with a trailing space
#_DEBUG_WINAPP2.INI.TXT shows 7 Lines with a trailing space
Press any key to continue . . .

 

Share this post


Link to post
Share on other sites

Also...the program continues and does not abort after trying to run x64 file on an x86 system.

I found earlier this year that all Piriform Portable products ignore what YOU try to run, and use the other version if it is better for the system.

 

e.g. When I deliberately run the 32 bit version on a 64 bit system it immediately transfers control to the 64 bit version if the 64 bit lives in the same folder.

"Analyze" found exactly the same amount of junk regardless of which I launched,

and I had to delete or rename the 64 bit version before I could get the 32 bit version to "Analyze" and find less junk (it could not see 64 bit junk)

I suspect you have encountered the similar feature on your x86 system,

and although you launched the x64 CCleaner it instantly transfered to the 32 bit version without any fuss or indication of a change to game plan.

 

Thanks for your report.

 

Apologies for the "32"

 

The correct line is

IF EXIST CCLEANER64.EXE ( CCLEANER64 /DEBUG ) ELSE ( CCLEANER /DEBUG )

This was a last minute change that went wrong as I corrected to the 32 bit version from the inferior code

IF EXIST CCLEANER.EXE ( CCLEANER /DEBUG ) ELSE ( CCLEANER64 /DEBUG )

 

I considered testing for a 64 bit Windows, e.g. SysWow64,

but this would not work if for some reason only the 32 bit CCleaner was present.in a x64 Windows.

 

e.g. until early this year I was using a 32 bit system and many portable 32 bit applications,

including the 32 bit CCleaner - the 64 bit version and the language folders were deleted immediatly after unzipping,

and initially this was all I used on my new 64 bit system

 

... = Running "CCLEANER{64} /DEBUG"

 

Please note that 64 is surrounded by braces, or squiggly brackets "to indicate a series of equal choices", as per

http://en.wikipedia.org/wiki/Bracket

It says the same thing regardless of which version is in use.

 

I will change the code to announce which variant was launched,

but checking whether it passes control to its brother is something for another day.

 

If you wish you can try my first thought on fixing the problem, but it will be tomorrow before I can fully test it.

 

Old code to be removed :-

IF EXIST CCLEANER64.EXE ( CCLEANER64 /DEBUG ) ELSE ( CCLEANER /DEBUG )
DEL %FILE%
CALL :T_N_S Running "CCLEANER{64} /DEBUG"

 

New replacement code :-

SET "CC=CCLEANER64.EXE" & IF NOT EXIST !CC! SET "CC=CCLEANER.EXE" & !CC! /DEBUG
DEL %FILE%
CALL :T_N_S Running "!CC! /DEBUG"

 

 

Regards

Alan.

Share this post


Link to post
Share on other sites

Alan the above "if" won't work esp with portable. I keep both in the same folder as they come, but I am 99.99% on 32bit machine

Share this post


Link to post
Share on other sites

When I have both on x64 machine, I can run the 32 bit CCleaner but it immediately switches to the x64 flavour,

so even though the "if" clause launches your CCLEANER64 I expected it to instantly switch to the 32 bit flavour,

but perhaps it crashes

 

The 3 lines I proposed last night have now been thoughly tested, but had to become 4 lines

This works - at least on x64 systems

 

SET "CC=CCLEANER64.EXE" & IF NOT EXIST !CC! SET "CC=CCLEANER.EXE"
!CC! /DEBUG
DEL %FILE%
CALL :T_N_S Running "!CC! /DEBUG"

 

I see no reason why this would fail on 32 bit systems - but I am just going out and cannot thorougly test till later

 

SET "CC=CCLEANER.EXE" & IF NOT EXIST !CC! SET "CC=CCLEANER64.EXE"
!CC! /DEBUG
DEL %FILE%
CALL :T_N_S Running "!CC! /DEBUG"

 

I look forward to any responses.

 

Alan

Share this post


Link to post
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

×