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

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

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)

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

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

Works very well. Went from winapp2.ini being 163kb to a 17kb. :D

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?

yup

Very Nice Alan....works great

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

Will play with this today....thanks

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 ;) )

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.

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

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.

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.

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

Some more things to play with today. Will try on x64 and x86 later.

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.

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.

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