Jump to content

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


Alan_B

Recommended Posts

Ran into a problem Alan on my x86.

 

If I compile the BAT to EXE, I get errors and it tells me to Run As Adminitrator even though I have UAC off and I am Administrator....even happens if I Run As Administrator:

FILE CREATION 18:42 03/03/2012   Execution  6:29:01.70
This script creates a trimmed WinApp2.ini giving a faster launch for CCleaner.
It is safe to use in "normal installed" CCleaner folder - no settings change
						  TECHNIQUE :-
Run TRIM_11.exe. 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 identify all "Detections"
and a trimmed Winapp2.ini is created which omits the NON-Detections.
Organize (alphabetic) WinApp2.ini - (O)rganize or (S)kip : (O or S) ? o
Trimming trailing spaces, IP = #_DOS_WINAPP2.INI : OP = #_FIX.INI
6:29:15.33 -  6:29:11.70  = 3630 mSec  =
 WinApp2.ini Entry Semi-AlphaNumeric Sequence :- Chaos Factor 79
6:29:16.37 -  6:29:15.34  = 1030 mSec  = I/P #_H3.TXT O/P NUL + HD_nnnn Array
6:29:20.81 -  6:29:16.37  = 4440 mSec  = I/P #_FIX.INI O/P indexed #_INI_1.INI
Invalid number.  Numeric constants are either decimal (17),
hexadecimal (0x11), or octal (021).
6:29:23.91 -  6:29:20.81  = 3100 mSec  = I/P=#_SRT_2.INI O/P #_#_WINAPP2.INI
Size ERROR #_FIX.INI=188747, #_#_WINAPP2.INI=280411
   Look for CORRUPTION in ERROR.LST
Unexpected content difference between sorted #_FIX.INI and #_#_WINAPP2.INI
Possibly harmless, e.g. extra blank lines, or SORT.EXE mistakes on some line(s)
Please inspect ERROR.LST to determine any content corruption in any line(s)
6:29:23.92 -  6:29:15.34  = 8580 mSec  = Duration of "CALL :Sort_INI ... "
Replace Chaos by Order in WinApp2.ini - (R)eplace or (S)kip : (R or S) ? s
CREATING FALSE/TRUE VARIANTS #_ZAP_WINAPP2.INI + #_DEBUG_ZAP_WINAPP2.INI
6:29:38.29 -  6:29:31.80  = 6490 mSec  =
 YOU  MUST  NOT  "Run Cleaner"  -  ONLY  Click "Analyze"
 After Analysis please CLOSE CCleaner so script may continue.
Press any key to continue . . .
6:29:49.69 -  6:29:40.97  = 8720 mSec  =
 F A I L U R E to detect any applicable WinApp2 [Applications *]
 -  Probably due to U.A.C. blocking CCLEANER.EXE /DEBUG
Suggest trying TRIM_11 using "Right Click" then "Run As Administrator"
Hit any key to close this window, then retry via "Run As Administrator"

 

If I run the EXE and choose to skip when asked if I want to Organize, everything is fine:

FILE CREATION 18:42 03/03/2012   Execution  6:33:17.34
This script creates a trimmed WinApp2.ini giving a faster launch for CCleaner.
It is safe to use in "normal installed" CCleaner folder - no settings change
						  TECHNIQUE :-
Run TRIM_11.exe. 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 identify all "Detections"
and a trimmed Winapp2.ini is created which omits the NON-Detections.
Organize (alphabetic) WinApp2.ini - (O)rganize or (S)kip : (O or S) ? s
Trimming trailing spaces, IP = #_DOS_WINAPP2.INI : OP = #_#_WINAPP2.INI
6:33:24.22 -  6:33:20.47  = 3750 mSec  =
CREATING FALSE/TRUE VARIANTS #_ZAP_WINAPP2.INI + #_DEBUG_ZAP_WINAPP2.INI
6:33:31.23 -  6:33:24.24  = 6990 mSec  =
 YOU  MUST  NOT  "Run Cleaner"  -  ONLY  Click "Analyze"
 After Analysis please CLOSE CCleaner so script may continue.
Press any key to continue . . .
6:33:50.51 -  6:33:33.94  = 16570 mSec		 =
6:33:50.84 -  6:33:50.57  = 270 mSec   =
6:33:51.15 -  6:33:50.88  = 270 mSec   =
CREATING NEW WINAPP2.INI and #_DEBUG_WINAPP2.INI
Found 74 - (Anomalies 0) = 74 Configs
6:34:07.11 -  6:33:51.19  = 15920 mSec		 =
Reporting "BAD" Volatile Detections in file #_?_BAD_*_WINAPP2.INI
6:34:11.47 -  6:34:07.26  = 4210 mSec  =
6:34:12.00 -  6:34:11.60  = 400 mSec   =
@_#_7_BAD_FULL.LST Volatile Detections - (P)reserve or (S)kip : (P or S) ? s
NEW= 03/05/2012 06:33 AM 18304  .\#TRIMMER\WINAPP2.INI  = 74 Configs
OLD= 02/23/2012 12:00 AM 188731  .\WINAPP2.INI - (U)pdate or (S)kip : (U or S) ?
s
Child Folder .\#TRIMMER\ - (D)elete or (S)kip : (D or S) ? s
Press any key to continue . . .

 

The INI file created matches v10 INI file.

25qd6wl.jpg
Link to comment
Share on other sites

Now that we are up to v11, any changelog or instructions on what has changed or has not....mainly for new users who have not been following.

 

NEW INSTRUCTIONS :-

Forget my initial advice when I launched the first script :rolleyes:

 

There are now almost no requirements other than to :-

download the script and change the extension from TXT to BAT and place in the same folder as Winapp2.ini plus CCleaner.exe (or CCleaner64.exe).

You can use an existing CCleaner folder - even one that has been installed and uses the registry.

 

This improvement is a result of feedback from yourself and others :)

 

The script will create the sub-folder #TRIMMER and do all its work in that folder,

and have no effect upon the parent CCleaner folder or its registry/configuration,

other than to update WinApp2.ini and/or add @_#_7_BAD_FULL.LST if the relevant options are chosen.

 

HINT

I find it useful to have my left finger hover over the letter 'A' ready for the message

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

After Analysis please CLOSE CCleaner so script may continue.

Press any key to continue . . .

Then I am ready to hit 'A' as my choice of "any key to continue" and my left finger continues to hover,

and when CCleaner has launched and the "Analyze" button is active I can hit 'A' again,

then I have to shuffle the mouse to the top right corner to close CCleaner - if only there was a keyboard short cut to close it.

 

Regards

Alan

Link to comment
Share on other sites

The first 5 lines of #_H2.TXT should be :-

100001 [ *]

100002 [.Thumbnails*]

100003 [.NET Framework Logs*]

100004 [.NET Reflector*]

100005 [32bit Web Browser*]

 

#_H2.TXT is sorted with an offset of 8 into #_H3.TXT

The first 5 lines of #_H3.TXT should be :-

100001 [ *]

100003 [.NET Framework Logs*]

100004 [.NET Reflector*]

100002 [.Thumbnails*]

100005 [32bit Web Browser*]

 

Do you have exactly the same ?

I believe numbers within the range 100001 through to 100771 are legal on 32 bit machines.

 

Is it possible that BAT to EXE has caused a problem ?

Will my script run correctly if it is not converted to an EXE.

 

I am taking an overdue lunch break but will be back shortly, and will try to add debug code to help

 

Regards

Alan

Link to comment
Share on other sites

The first 5 lines of #_H2.TXT should be :-

100001 [ *]

100002 [.Thumbnails*]

100003 [.NET Framework Logs*]

100004 [.NET Reflector*]

100005 [32bit Web Browser*]

 

#_H2.TXT is sorted with an offset of 8 into #_H3.TXT

The first 5 lines of #_H3.TXT should be :-

100001 [ *]

100003 [.NET Framework Logs*]

100004 [.NET Reflector*]

100002 [.Thumbnails*]

100005 [32bit Web Browser*]

 

Do you have exactly the same ?

Well YES and NO

#_H2.TXT

100001	 [ *]
100002	[.Thumbnails*]
100003	[.NET Framework Logs*]
100004	[.NET Reflector*]
100005	[32bit Web Browser*]

 

#_H3.TXT

100001	 [ *]
100003	[.NET Framework Logs*]
100004	[.NET Reflector*]
100002	[.Thumbnails*]
100005	[32bit Web Browser*]
100006	[3GP Video Converter*]

 

Notice the slight shift in [ *]

 

EDIT: a screenshot would be better:

e82d4dfa98.jpg

 

Is it possible that BAT to EXE has caused a problem ?

Will my script run correctly if it is not converted to an EXE.

 

I have done a file comparison on the BAT file and the extracted BAT file when the program runs.

3 Differences...well 2 I really should not count the 1st line where it has @SHIFT

 

 

Line 241

ORG BAT: SET /A PREFIX=%DispSrt%*2

EXTRACTED BAT:SET /A PREFIX=%DispSrt%cmdln%2

 

Line 388

ORG BAT: ECHO !S_X! - !S_o! = !D_X!0 mSec = %*

EXTRACTED BAT: ECHO !S_X! - !S_o! = !D_X!0 mSec = %cmdln%

 

The * is changing to cmdln

 

YES, the unconverted BAT file does work.

25qd6wl.jpg
Link to comment
Share on other sites

NEW INSTRUCTIONS :-

Forget my initial advice when I launched the first script :rolleyes:

 

There are now almost no requirements other than to :-

download the script and change the extension from TXT to BAT and place in the same folder as Winapp2.ini plus CCleaner.exe (or CCleaner64.exe).

You can use an existing CCleaner folder - even one that has been installed and uses the registry.

 

This improvement is a result of feedback from yourself and others :)

 

The script will create the sub-folder #TRIMMER and do all its work in that folder,

and have no effect upon the parent CCleaner folder or its registry/configuration,

other than to update WinApp2.ini and/or add @_#_7_BAD_FULL.LST if the relevant options are chosen.

 

HINT

I find it useful to have my left finger hover over the letter 'A' ready for the message

 

Then I am ready to hit 'A' as my choice of "any key to continue" and my left finger continues to hover,

and when CCleaner has launched and the "Analyze" button is active I can hit 'A' again,

then I have to shuffle the mouse to the top right corner to close CCleaner - if only there was a keyboard short cut to close it.

 

Regards

Alan

 

In one of the scripts...forgot which one, there was an option for EXCLUDE.TXT??? (not clear anymore).......Is that still an option to use?

How about (though may seem redundant), an brief explaination of what you are doing at each prompt. For instance, what are you Organizing/Sorting? What happens at that stage. Which INI file are you overwriting? I know some may be obvious, but if anyone has not used this before, they may have questions.

 

Suggestion for down the road....How about an online HELP where it does have an FAQ. This way as you do updates or changes, you can change the FAQ within the program. If a user presses (H), it goes into the FAQ section and once finished, you can exit or take him/her to the start.

25qd6wl.jpg
Link to comment
Share on other sites

Sorry. I failed to put my 5 lines in a quote or code box.

I do actually have a deliberate shift to the right on the first item [ *] to absolutely ensure it stays at the top when alpha sorted.

 

For line 241 you could try

SET /A PREFIX=(%DispSrt%) * 2

 

That is the cause of the problem

 

Line 388 is only diagnostic time stamping

and is NOT used by the new SORT procedure that has a much faster implementation at the beginning of the script.

 

I will think some more about line 388.

 

Yes, Exclude still functions.

 

Just rushing out, back later this afternoon.

 

Regards

Alan

Link to comment
Share on other sites

That seems to have fixed it Alan. I just replaced your line above and no errors

SORT #_INI_1.INI > #_SRT_2.INI
REM SET /A PREFIX=%DispSrt%*2	  <<<<<=========
SET /A PREFIX=(%DispSrt%) * 2		  <<<<<=========
CALL :SET_HI #_FIX.INI %LO% to %HI%

 

 

"CCleaner /Debug" is launched to identify all "Detections"
and a trimmed Winapp2.ini is created which omits the NON-Detections.
Organize (alphabetic) WinApp2.ini - (O)rganize or (S)kip : (O or S) ? o
Trimming trailing spaces, IP = #_DOS_WINAPP2.INI : OP = #_FIX.INI
10:14:13.32 - 10:14:08.92  = 4400 mSec  =
 WinApp2.ini Entry Semi-AlphaNumeric Sequence :- Chaos Factor 79
10:14:14.42 - 10:14:13.33  = 1090 mSec  = I/P #_H3.TXT O/P NUL + HD_nnnn Array
10:14:20.63 - 10:14:14.42  = 6210 mSec  = I/P #_FIX.INI O/P indexed #_INI_1.INI
10:14:24.51 - 10:14:20.64  = 3870 mSec  = I/P=#_SRT_2.INI O/P #_#_WINAPP2.INI
10:14:24.53 - 10:14:13.33  = 11200 mSec		 = Duration of "CALL :Sort_INI ... "
Replace Chaos by Order in WinApp2.ini - (R)eplace or (S)kip : (R or S) ? s
CREATING FALSE/TRUE VARIANTS #_ZAP_WINAPP2.INI + #_DEBUG_ZAP_WINAPP2.INI
10:14:39.65 - 10:14:31.32  = 8330 mSec  =
 YOU  MUST  NOT  "Run Cleaner"  -  ONLY  Click "Analyze"
 After Analysis please CLOSE CCleaner so script may continue.
Press any key to continue . . .
10:14:59.71 - 10:14:43.85  = 15860 mSec		 =
10:15:00.20 - 10:14:59.77  = 430 mSec   =
10:15:00.55 - 10:15:00.23  = 320 mSec   =
CREATING NEW WINAPP2.INI and #_DEBUG_WINAPP2.INI
Found 74 - (Anomalies 0) = 74 Configs
10:15:20.06 - 10:15:00.59  = 19470 mSec		 =
Reporting "BAD" Volatile Detections in file #_?_BAD_*_WINAPP2.INI
10:15:26.35 - 10:15:20.20  = 6150 mSec  =
10:15:27.05 - 10:15:26.60  = 450 mSec   =
@_#_7_BAD_FULL.LST Volatile Detections - (P)reserve or (S)kip : (P or S) ? s
NEW= 03/05/2012 10:15 AM 18304  .\#TRIMMER\WINAPP2.INI  = 74 Configs
OLD= 02/23/2012 12:00 AM 188731  .\WINAPP2.INI - (U)pdate or (S)kip : (U or S) ? s
Child Folder .\#TRIMMER\ - (D)elete or (S)kip : (D or S) ? s
Press any key to continue . . .

25qd6wl.jpg
Link to comment
Share on other sites

That seems to have fixed it Alan. I just replaced your line above and no errors

SORT #_INI_1.INI > #_SRT_2.INI
REM SET /A PREFIX=%DispSrt%*2	  <<<<<=========
SET /A PREFIX=(%DispSrt%) * 2		  <<<<<=========
CALL :SET_HI #_FIX.INI %LO% to %HI%

Would you please replace the line "SET /A PREFIX ..." with

SET /A PREFIX=%DispSrt%*2
SET /A PREFIx1=(%DispSrt%) * 2
SET /A PREFIx2=2*%DispSrt%
SET /A PREFIx3=!DispSrt!*2
SET /A PREFIx4=2*!DispSrt!
ECHO _%PREFIX%_%PREFIx1%_%PREFIx2%_%PREFIx3%_%PREFIx4%_

That gives me this on my screen

_16_16_16_16_16_

I would like to see the consequences when you have run the result of using the bat/exe converter, so I may choose the most elegant solution.

 

I think the problem with the converter is that instead of expanding %DispSrt% to the value 8, and multiplying by 2,

it instead looks first of all at the tail end of %*2 and it gets seriously "out of whack"

My guesses are that :-

%* means ALL the arguments which follow the invocation of a BAT script of an internal "function", and '2' gets appended, or

the '*' is skipped over and it interprets %*2 as being %2 which is the second argument of any invocation.

 

Would you also please replace the final code block with

:T_N_S
%TOCK%	 = _%*
CALL :T_N
SET /A D_X=!N_X!-!N_o! & SET DWELL=#	!D_X!
ECHO !S_X! - !S_o! = !D_X!0 mSec	 = "%*"
ECHO !S_X! - !S_o! = !D_X!0 mSec	 = _%1 %2 %3 %4 %5 %6 %7 %8 %9 #
GOTO :EOF
:T_N
%TICK%
SET S_o=!S_X! & SET N_o=!N_X! & SET S_X=%TIME%
FOR /F "tokens=1-4 delims=:." %%d in ("%S_X%") do SET /A N_X=%%d*360000+1%%e*6000+1%%f*100+1%%g-610100

This replaces one timing measurement with 3 variants.

 

%TOCK% = _%*

This variant works for me,

 

ECHO !S_X! - !S_o! = !D_X!0 mSec = "%*"

This is the original, but with "quotes" around the %* argument

 

ECHO !S_X! - !S_o! = !D_X!0 mSec = _%1 %2 %3 %4 %5 %6 %7 %8 %9 #

This is similar to using %*

but unfortinately it omits any ',' or '='. as shown at the beginning by

17:37:45.71 - 17:37:42.46 = 3250 mSec = _Found 5729 lines, 0 needed Trim

17:37:45.71 - 17:37:42.46 = 3250 mSec = "Found 5729 lines, 0 needed Trim"

17:37:45.71 - 17:37:42.46 = 3250 mSec = _Found 5729 lines 0 needed Trim #

and at the end by

17:38:23.95 - 17:38:23.69 = 260 mSec = _0 BAD In 70 Det. = #_8_BAD_MINI.LST

17:38:23.95 - 17:38:23.69 = 260 mSec = "0 BAD In 70 Det. = #_8_BAD_MINI.LST"

17:38:23.95 - 17:38:23.69 = 260 mSec = _0 BAD In 70 Det. #_8_BAD_MINI.LST #

 

The results of my debug tweaks on my machine are

FILE CREATION 18:42 03/03/2012 Execution 17:37:39.84

 

This script creates a trimmed WinApp2.ini giving a faster launch for CCleaner.

It is safe to use in "normal installed" CCleaner folder - no settings change

TECHNIQUE :-

Run 111.bat. 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 identify all "Detections"

and a trimmed Winapp2.ini is created which omits the NON-Detections.

 

Organize (alphabetic) WinApp2.ini - (O)rganize or (S)kip : (O or S) ? o

Trimming trailing spaces, IP = #_DOS_WINAPP2.INI : OP = #_FIX.INI

17:37:45.71 - 17:37:42.46 = 3250 mSec = _Found 5729 lines, 0 needed Trim

17:37:45.71 - 17:37:42.46 = 3250 mSec = "Found 5729 lines, 0 needed Trim"

17:37:45.71 - 17:37:42.46 = 3250 mSec = _Found 5729 lines 0 needed Trim #

 

WinApp2.ini Entry Semi-AlphaNumeric Sequence :- Chaos Factor 79

17:37:46.48 - 17:37:45.72 = 760 mSec = I/P #_H3.TXT O/P NUL + HD_nnnn Array

17:37:50.14 - 17:37:46.48 = 3660 mSec = I/P #_FIX.INI O/P indexed #_INI_1.INI

_16_16_16_16_16_

17:37:52.47 - 17:37:50.14 = 2330 mSec = I/P=#_SRT_2.INI O/P #_#_WINAPP2.INI

17:37:52.48 - 17:37:45.72 = 6760 mSec = Duration of "CALL :Sort_INI ... "

Replace Chaos by Order in WinApp2.ini - ®eplace or (S)kip : (R or S) ? s

 

CREATING FALSE/TRUE VARIANTS #_ZAP_WINAPP2.INI + #_DEBUG_ZAP_WINAPP2.INI

17:38:02.83 - 17:37:57.35 = 5480 mSec = _Counted 780 Configuration blocks

17:38:02.84 - 17:37:57.35 = 5490 mSec = "Counted 780 Configuration blocks"

17:38:02.84 - 17:37:57.35 = 5490 mSec = _Counted 780 Configuration blocks #

 

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

After Analysis please CLOSE CCleaner so script may continue.

Press any key to continue . . .

17:38:12.99 - 17:38:04.43 = 8560 mSec = _Using "CCLEANER64.EXE /DEBUG"

17:38:12.99 - 17:38:04.43 = 8560 mSec = "Using "CCLEANER64.EXE /DEBUG""

17:38:12.99 - 17:38:04.43 = 8560 mSec = _Using "CCLEANER64.EXE /DEBUG" #

17:38:13.07 - 17:38:13.01 = 60 mSec = _Built #_CCLEANER.LST

17:38:13.08 - 17:38:13.01 = 70 mSec = "Built #_CCLEANER.LST"

17:38:13.08 - 17:38:13.01 = 70 mSec = _Built #_CCLEANER.LST #

17:38:13.18 - 17:38:13.09 = 90 mSec = _66 off TRIMMED Config Blocks

17:38:13.19 - 17:38:13.09 = 100 mSec = "66 off TRIMMED Config Blocks"

17:38:13.19 - 17:38:13.09 = 100 mSec = _66 off TRIMMED Config Blocks #

 

CREATING NEW WINAPP2.INI and #_DEBUG_WINAPP2.INI

Found 66 - (Anomalies 0) = 66 Configs

17:38:20.72 - 17:38:13.20 = 7520 mSec = _debug + Reduced WINAPP2 66 Configs

17:38:20.72 - 17:38:13.20 = 7520 mSec = "debug + Reduced WINAPP2 66 Configs"

17:38:20.72 - 17:38:13.20 = 7520 mSec = _debug + Reduced WINAPP2 66 Configs #

 

Reporting "BAD" Volatile Detections in file #_?_BAD_*_WINAPP2.INI

17:38:23.62 - 17:38:20.78 = 2840 mSec = _7 BAD In 831 Det. = #_7_BAD_FULL.LST

17:38:23.63 - 17:38:20.78 = 2850 mSec = "7 BAD In 831 Det. = #_7_BAD_FULL.LST"

17:38:23.63 - 17:38:20.78 = 2850 mSec = _7 BAD In 831 Det. #_7_BAD_FULL.LST #

17:38:23.95 - 17:38:23.69 = 260 mSec = _0 BAD In 70 Det. = #_8_BAD_MINI.LST

17:38:23.95 - 17:38:23.69 = 260 mSec = "0 BAD In 70 Det. = #_8_BAD_MINI.LST"

17:38:23.95 - 17:38:23.69 = 260 mSec = _0 BAD In 70 Det. #_8_BAD_MINI.LST #

@_#_7_BAD_FULL.LST Volatile Detections - (P)reserve or (S)kip : (P or S) ? s

 

NEW= 05/03/2012 17:38 16123 .\#TRIM\WINAPP2.INI = 66 Configs

OLD= 02/03/2012 22:00 188731 .\WINAPP2.INI - (U)pdate or (S)kip : (U or S) ? s

 

Child Folder .\#TRIM\ - (D)elete or (S)kip : (D or S) ? s

Press any key to continue . . .

 

E:\T\CCleaner\New\T11>

 

Regards

Alan

Link to comment
Share on other sites

I changed the code to this:

REM SET /A PREFIX=%DispSrt%*2
REM SET /A PREFIX=(%DispSrt%) * 2
SET /A PREFIX=%DispSrt%*2
SET /A PREFIx1=(%DispSrt%) * 2
SET /A PREFIx2=2*%DispSrt%
SET /A PREFIx3=!DispSrt!*2
SET /A PREFIx4=2*!DispSrt!
ECHO _%PREFIX%_%PREFIx1%_%PREFIx2%_%PREFIx3%_%PREFIx4%_
CALL :SET_HI #_FIX.INI %LO% to %HI%

:T_N_S
%TOCK%   = _%*
CALL :T_N
SET /A D_X=!N_X!-!N_o! & SET DWELL=#    !D_X!
ECHO !S_X! - !S_o! = !D_X!0 mSec		 = "%*"
ECHO !S_X! - !S_o! = !D_X!0 mSec		 = _%1 %2 %3 %4 %5 %6 %7 %8 %9 #
GOTO :EOF
:T_N
%TICK%
SET S_o=!S_X! & SET N_o=!N_X! & SET S_X=%TIME%
FOR /F "tokens=1-4 delims=:." %%d in ("%S_X%") do SET /A N_X=%%d*360000+1%%e*6000+1%%f*100+1%%g-610100

 

This is the output

FILE CREATION 18:42 03/03/2012   Execution 12:27:41.41
This script creates a trimmed WinApp2.ini giving a faster launch for CCleaner.
It is safe to use in "normal installed" CCleaner folder - no settings change
						  TECHNIQUE :-
Run TRIM_11ß3.exe. 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 identify all "Detections"
and a trimmed Winapp2.ini is created which omits the NON-Detections.
Organize (alphabetic) WinApp2.ini - (O)rganize or (S)kip : (O or S) ? o
Trimming trailing spaces, IP = #_DOS_WINAPP2.INI : OP = #_FIX.INI
12:27:53.61 - 12:27:49.05  = 4560 mSec   = _
12:27:53.62 - 12:27:49.05  = 4570 mSec		 = ""
12:27:53.62 - 12:27:49.05  = 4570 mSec		 = _Found 5729 lines 0 needed Trim    #
 WinApp2.ini Entry Semi-AlphaNumeric Sequence :- Chaos Factor 79
12:27:54.56 - 12:27:53.63  = 930 mSec   = I/P #_H3.TXT O/P NUL + HD_nnnn Array
12:28:00.20 - 12:27:54.56  = 5640 mSec  = I/P #_FIX.INI O/P indexed #_INI_1.INI
Invalid number.  Numeric constants are either decimal (17),
hexadecimal (0x11), or octal (021).
__16_16_16_16_
12:28:03.58 - 12:28:00.20  = 3380 mSec  = I/P=#_SRT_2.INI O/P #_#_WINAPP2.INI
Size ERROR #_FIX.INI=188747, #_#_WINAPP2.INI=280411
   Look for CORRUPTION in ERROR.LST
Unexpected content difference between sorted #_FIX.INI and #_#_WINAPP2.INI
Possibly harmless, e.g. extra blank lines, or SORT.EXE mistakes on some line(s)
Please inspect ERROR.LST to determine any content corruption in any line(s)
12:28:03.60 - 12:27:53.63  = 9970 mSec  = Duration of "CALL :Sort_INI ... "
Replace Chaos by Order in WinApp2.ini - (R)eplace or (S)kip : (R or S) ? s
CREATING FALSE/TRUE VARIANTS #_ZAP_WINAPP2.INI + #_DEBUG_ZAP_WINAPP2.INI
12:28:26.11 - 12:28:18.59  = 7520 mSec   = _
12:28:26.12 - 12:28:18.59  = 7530 mSec		 = ""
12:28:26.12 - 12:28:18.59  = 7530 mSec		 = _Counted 0 Configuration blocks	  #
 YOU  MUST  NOT  "Run Cleaner"  -  ONLY  Click "Analyze"
 After Analysis please CLOSE CCleaner so script may continue.
Press any key to continue . . .
12:28:46.38 - 12:28:32.51  = 13870 mSec   = _
12:28:46.40 - 12:28:32.51  = 13890 mSec		 = ""
12:28:46.40 - 12:28:32.51  = 13890 mSec		 = _Using "CCLEANER.EXE /DEBUG"	    #
 F A I L U R E to detect any applicable WinApp2 [Applications *]
 -  Probably due to U.A.C. blocking CCLEANER.EXE /DEBUG
Suggest trying TRIM_11ß3 using "Right Click" then "Run As Administrator"
Hit any key to close this window, then retry via "Run As Administrator"

25qd6wl.jpg
Link to comment
Share on other sites

Many thanks.

 

As I suspected, the BAT/EXE conversion goes horribly wrong when it encounters %*2 in "SET /A PREFIX=%DispSrt%*2"

but fortunately the 4 alternatives give the correct answers.

 

Please replace the debug code

SET /A PREFIX=%DispSrt%*2
SET /A PREFIx1=(%DispSrt%)*2
SET /A PREFIx2=2*%DispSrt%
SET /A PREFIx3=!DispSrt!*2
SET /A PREFIx4=!DispSrt!*2
ECHO _%PREFIX%_%PREFIx1%_%PREFIx2%_%PREFIx3%_%PREFIx4%_

with the single line

SET /A PREFIX=!DispSrt!*2

That should allow SORT to function properly.

 

I will come back later, hopefully with a fix for the diagnostic time stamp messages.

 

Regards

Alan

 

------------- Explanation of what went wrong - Optional reading matter ----------------

 

In the middle of your last screen capture is this

12:28:00.20 - 12:27:54.56 = 5640 mSec = I/P #_FIX.INI O/P indexed #_INI_1.INI

Invalid number. Numeric constants are either decimal (17),

hexadecimal (0x11), or octal (021).

__16_16_16_16_

12:28:03.58 - 12:28:00.20 = 3380 mSec = I/P=#_SRT_2.INI O/P #_#_WINAPP2.INI

Size ERROR #_FIX.INI=188747, #_#_WINAPP2.INI=280411

Look for CORRUPTION in ERROR.LST

Unexpected content difference between sorted #_FIX.INI and #_#_WINAPP2.INI

 

WHAT WONDERFUL FORUM SOFTWARE

:o As soon as I put the above in a quote box or a code box then it becomes one continuous linePerhaps it is interpreting 12:28:00.20 as some sort of I.P. Address :unsure:

 

As I was saying 5640 mSec were spent reading #_FIX.INI and writing #_INI_1.INI

 

#_FIX.INI is 184 KB (188,747 bytes)

and the first two and a bit entries are :-

[.Thumbnails*]

LangSecRef=3021

DetectFile=%UserProfile%\.Thumbnails

Default=False

FileKey1=%UserProfile%\.Thumbnails|*.*|RECURSE

 

[.NET Framework Logs*]

LangSecRef=3025

Detect=HKLM\Software\Microsoft\.NETFramework

Default=False

FileKey1=%WinDir%\Microsoft.NET|*.log|RECURSE

 

[.NET Reflector*]

LangSecRef=3021

 

#_INI_1.INI is 273 KB (280,411 bytes)

and the first two and a bit entries are :-

100004 100014 ][.Thumbnails*]

100004 100015 ]LangSecRef=3021

100004 100016 ]DetectFile=%UserProfile%\.Thumbnails

100004 100017 ]Default=False

100004 100018 ]FileKey1=%UserProfile%\.Thumbnails|*.*|RECURSE

100004 100019 ]

100002 100020 ][.NET Framework Logs*]

100002 100021 ]LangSecRef=3025

100002 100022 ]Detect=HKLM\Software\Microsoft\.NETFramework

100002 100023 ]Default=False

100002 100024 ]FileKey1=%WinDir%\Microsoft.NET|*.log|RECURSE

100002 100025 ]

100003 100026 ][.NET Reflector*]

100003 100027 ]LangSecRef=3021

 

That file is sorted (indices rule supreme) to #_SRT_2.INI size 273 KB (280,411 bytes)

and the first two and a bit entries are :-

100002 100020 ][.NET Framework Logs*]

100002 100021 ]LangSecRef=3025

100002 100022 ]Detect=HKLM\Software\Microsoft\.NETFramework

100002 100023 ]Default=False

100002 100024 ]FileKey1=%WinDir%\Microsoft.NET|*.log|RECURSE

100002 100025 ]

100003 100026 ][.NET Reflector*]

100003 100027 ]LangSecRef=3021

100003 100028 ]DetectFile=%LocalAppData%\Red Gate\.NET Reflector 6\Reflector.cfg

100003 100029 ]Default=False

100003 100030 ]FileKey1=%LocalAppData%\Red Gate\.NET Reflector 6\Cache|*.*|RECURSE

100003 100031 ]FileKey2=%LocalAppData%\Red Gate\.NET Reflector 6|Reflector.cfg

100003 100032 ]

100004 100014 ][.Thumbnails*]

100004 100015 ]LangSecRef=3021

 

Then you show

12:28:03.58 - 12:28:00.20 = 3380 mSec = I/P=#_SRT_2.INI O/P #_#_WINAPP2.INI

That is when #_SRT_2.INI O/P was read in and #_#_WINAPP2.INI was written out one line at a time.

There is "special magic" to exclude the first 16 character from each line with this instruction

ECHO.!LN:~%PREFIX%!

Unfortunately because BAT/EXE caused a malfunction with

SET /A PREFIX=%DispSrt%*2

no characters were excluded, hence you got the error report

Size ERROR #_FIX.INI=188747, #_#_WINAPP2.INI=280411

Link to comment
Share on other sites

@Tr3bg0D

 

Would you please insert between

SETLOCAL EnableDelayedExpansion
CD /D %~dp0 & REM All files are here, not at stupid "Run As Administrator" default %windir%\

this DEBUG code

CALL :T_N
ping -w 40 -n 2 127.0.0.1 > nul
CALL :T_N_S Test 1 . , = % ! # X

%TICK%
ping -w 40 -n 2 127.0.0.1 > nul
%TOCK%	 = _Test 2 . , = % ! # Y

PAUSE
EXIT /B

And then run and post result.

 

I get the following :-

22:02:39.92 - 22:02:38.88  = 1040 mSec  = _Test 1 . , =   # X
22:02:39.93 - 22:02:38.88  = 1050 mSec  = "Test 1 . , =   # X"
22:02:39.93 - 22:02:38.88  = 1050 mSec  = _Test 1 . # X	 #
22:02:40.96 - 22:02:39.93  = 1030 mSec  = _Test 2 . , =   # Y
Press any key to continue . . .

E:\T\CCleaner\New\T11>

 

I suspect that you will have success with the last of the four messages, because

 

The first of the four messages is delivered via CALL T_N_S to code that invokes %TOCK% _%*

and that works for me but not for you

The last of the four messages does not CALL any code, but directly invokes %TOCK%

and that is what gave you time stamps with explanatory text at :-

WinApp2.ini Entry Semi-AlphaNumeric Sequence :- Chaos Factor 79

12:27:54.56 - 12:27:53.63 = 930 mSec = I/P #_H3.TXT O/P NUL + HD_nnnn Array

12:28:00.20 - 12:27:54.56 = 5640 mSec = I/P #_FIX.INI O/P indexed #_INI_1.INI

 

If this works then I will replace all :T_N and :T_N_S code with %TICK% and %TOCK%.

That is a cleanup improvement I had thought of but deferred on the grounds that it is easier to fix one thing at a time,

but when Push comes to Shove then cherished principles take a backseat.

 

Regards

Alan

Link to comment
Share on other sites

Just to be clear, is this what you want me to do:

SETLOCAL EnableDelayedExpansion
CALL :T_N
ping -w 40 -n 2 127.0.0.1 > nul
CALL :T_N_S Test 1 . , = % ! # X
%TICK%
ping -w 40 -n 2 127.0.0.1 > nul
%TOCK%   = _Test 2 . , = % ! # Y
PAUSE
EXIT /B
CD /D %~dp0 & REM All files are here, not at stupid "Run As Administrator" default %windir%\
ECHO FILE CREATION 18:42 03/03/2012   Execution %TIME%

25qd6wl.jpg
Link to comment
Share on other sites

RESULT

17:09:45.93 - 17:09:44.87  = 1060 mSec   = _
17:09:45.94 - 17:09:44.87  = 1070 mSec		 = ""
17:09:45.94 - 17:09:44.87  = 1070 mSec		 = _Test 1 . # X	 #
17:09:47.00 - 17:09:45.94  = 1060 mSec   = _Test 2 . , =   # Y
Press any key to continue . . .

25qd6wl.jpg
Link to comment
Share on other sites

RESULT

17:09:45.93 - 17:09:44.87  = 1060 mSec   = _
17:09:45.94 - 17:09:44.87  = 1070 mSec		 = ""
17:09:45.94 - 17:09:44.87  = 1070 mSec		 = _Test 1 . # X	 #
17:09:47.00 - 17:09:45.94  = 1060 mSec   = _Test 2 . , =   # Y
Press any key to continue . . .

Thanks.

 

You did good.

You got the result I hoped for.

 

My new Tick Tock executable variables are not only much faster than the "CALL :T_N_S" technique,

but they fortuitously preserve any , and = characters that are embedded in a text string,

as is shown by the fourth message.

 

I will be back :)

Link to comment
Share on other sites

@Tr3bg0D

Please test and advise results.

I am hoping all is well, and that you will see each time stamp now concludes with a comment upon what was happening.

I show below the results I obtain..

I have not changed the name because the normal functionality is the same.

To avoid confusion with original TRIM_11 and any final release,

I have attached this as TRIM.TXT, which can be downloaded and renamed as either TRIM.BAT or TRIM.CMD

 

Regards

Alan

 

FILE CREATION 09:32 06/03/2012 Execution 10:06:46.61

 

This script creates a trimmed WinApp2.ini giving a faster launch for CCleaner.

It is safe to use in "normal installed" CCleaner folder - no settings change

TECHNIQUE :-

Run Trim_11.bat. 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 identify all "Detections"

and a trimmed Winapp2.ini is created which omits the NON-Detections.

 

Organize (alphabetic) WinApp2.ini - (O)rganize or (S)kip : (O or S) ? o

Trimming trailing spaces, IP = #_DOS_WINAPP2.INI : OP = #_FIX.INI

10:06:55.51 - 10:06:52.23 = 3280 mSec = Found 5729 lines, 0 needed Trim

 

WinApp2.ini Entry Semi-AlphaNumeric Sequence :- Chaos Factor 79

10:06:56.26 - 10:06:55.51 = 750 mSec = I/P #_H3.TXT O/P NUL + HD_nnnn Array

10:06:59.97 - 10:06:56.26 = 3710 mSec = I/P #_FIX.INI O/P indexed #_INI_1.INI

10:07:02.26 - 10:06:59.98 = 2280 mSec = I/P #_SRT_2.INI O/P #_#_WINAPP2.INI

10:07:02.27 - 10:06:55.51 = 6760 mSec = Duration of "CALL :Sort_INI ... "

Replace Chaos by Order in .\WinApp2.ini - ®eplace or (S)kip : (R or S) ? s

 

CREATING FALSE/TRUE VARIANTS #_ZAP_WINAPP2.INI + #_DEBUG_ZAP_WINAPP2.INI

10:07:13.23 - 10:07:07.67 = 5560 mSec = Counted 780 Configuration blocks

 

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

After Analysis please CLOSE CCleaner so script may continue.

Press any key to continue . . .

10:07:25.19 - 10:07:16.28 = 8910 mSec = Using "CCLEANER64.EXE /DEBUG"

10:07:25.25 - 10:07:25.19 = 60 mSec = Built #_CCLEANER.LST

10:07:25.35 - 10:07:25.25 = 100 mSec = 66 off TRIMMED Config Blocks

 

CREATING NEW WINAPP2.INI and #_DEBUG_WINAPP2.INI

Found 66 - (Anomalies 0) = 66 Configs

10:07:32.88 - 10:07:25.35 = 7530 mSec = debug + Reduced WINAPP2 66 Configs

 

Reporting "BAD" Volatile Detections in file #_?_BAD_*_WINAPP2.INI

10:07:35.69 - 10:07:32.94 = 2750 mSec = 7 BAD In 831 Det. = #_7_BAD_FULL.LST

10:07:35.99 - 10:07:35.75 = 240 mSec = 0 BAD In 70 Det. = #_8_BAD_MINI.LST

@_#_7_BAD_FULL.LST Volatile Detections - (P)reserve or (S)kip : (P or S) ? s

 

NEW=06/03/2012 10:07 16123 .\#TRIMMER\WINAPP2.INI = 66 Configs

OLD=02/03/2012 22:00 188731 .\WINAPP2.INI - (U)pdate or (S)kip : (U or S) ? s

 

Child Folder .\#TRIMMER\ - (D)elete or (S)kip : (D or S) ? s

Press any key to continue . . .

 

Trim.TXT

Link to comment
Share on other sites

Looks good. Will test on more systems later. I will also send you the EXE in a few minutes

FILE CREATION 09:32 06/03/2012   Execution  9:22:05.68
This script creates a trimmed WinApp2.ini giving a faster launch for CCleaner.
It is safe to use in "normal installed" CCleaner folder - no settings change
						  TECHNIQUE :-
Run Trim_11-2ß.exe. 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 identify all "Detections"
and a trimmed Winapp2.ini is created which omits the NON-Detections.
Organize (alphabetic) WinApp2.ini - (O)rganize or (S)kip : (O or S) ? o
Trimming trailing spaces, IP = #_DOS_WINAPP2.INI : OP = #_FIX.INI
9:22:15.97 -  9:22:12.21 = 3760 mSec   = Found 5729 lines, 0 needed Trim
 WinApp2.ini Entry Semi-AlphaNumeric Sequence :- Chaos Factor 79
9:22:17.05 -  9:22:15.98 = 1070 mSec   = I/P #_H3.TXT O/P NUL + HD_nnnn Array
9:22:23.50 -  9:22:17.05 = 6450 mSec   = I/P #_FIX.INI O/P indexed #_INI_1.INI
9:22:26.42 -  9:22:23.51 = 2910 mSec   = I/P #_SRT_2.INI O/P #_#_WINAPP2.INI
9:22:26.44 -  9:22:15.98 = 10460 mSec  = Duration of "CALL :Sort_INI ... "
Replace Chaos by Order in .\WinApp2.ini - (R)eplace or (S)kip : (R or S) ? r
    1 file(s) copied.
Directory of D:\APPS\CCleaner\TRIM_INI
03/06/2012  09:22 AM		   188,747 WINAPP2.INI
CREATING FALSE/TRUE VARIANTS #_ZAP_WINAPP2.INI + #_DEBUG_ZAP_WINAPP2.INI
9:22:38.16 -  9:22:31.45 = 6710 mSec   = Counted 780 Configuration blocks
 YOU  MUST  NOT  "Run Cleaner"  -  ONLY  Click "Analyze"
 After Analysis please CLOSE CCleaner so script may continue.
Press any key to continue . . .
9:22:56.77 -  9:22:42.29 = 14480 mSec  = Using "CCLEANER.EXE /DEBUG"
9:22:57.17 -  9:22:56.78 = 390 mSec    = Built #_CCLEANER.LST
9:22:57.33 -  9:22:57.17 = 160 mSec    = 74 off TRIMMED Config Blocks
CREATING NEW WINAPP2.INI and #_DEBUG_WINAPP2.INI
Found 74 - (Anomalies 0) = 74 Configs
9:23:12.11 -  9:22:57.34 = 14770 mSec  = debug + Reduced WINAPP2 74 Configs
Reporting "BAD" Volatile Detections in file #_?_BAD_*_WINAPP2.INI
9:23:16.27 -  9:23:12.25 = 4020 mSec   = 7 BAD In 831 Det. = #_7_BAD_FULL.LST
9:23:16.85 -  9:23:16.40 = 450 mSec    = 1 BAD In 78 Det. = #_8_BAD_MINI.LST
@_#_7_BAD_FULL.LST Volatile Detections - (P)reserve or (S)kip : (P or S) ? s
NEW=03/06/2012 09:23 AM 18304  .\#TRIMMER\WINAPP2.INI  = 74 Configs
OLD=03/06/2012 09:22 AM 188747  .\WINAPP2.INI - (U)pdate or (S)kip : (U or S) ? s
Child Folder .\#TRIMMER\ - (D)elete or (S)kip : (D or S) ? s
Press any key to continue . . .

25qd6wl.jpg
Link to comment
Share on other sites

I attach Trim_12.txt, ready for download and rename and use as Trim_12.bat (or Trim_12.cmd)

 

This improves on Trim_11 in two aspects :-

 

1. I have changed some code to avoid confusing a BAT to EXE converter.

Thanks to further P.M. exchanges with and testing by Tr3bg0D a converted EXE now gives the same results as the original BAT ;

 

2. If there is any warning about the Alphabetic Organized file being a different size or having different content from the input file,

then the code refrains from offering to over-write the downloaded WinApp2.ini.

This re-instates my original design which I cancelled when I found spurious False Alarms arose from anomalies in Windows Sort.exe.

I now have mastery over the anomaly so False Alarms no longer happen

 

3. I now create CCleaner.ini with an absolutely brand new "Update= ..." TimeStamp.

That is POSSIBLY fooling CCleaner.exe into thinking that it is so up to date that it does not waste time checking for any later version.

It is CERTAINLY (thus far) resulting in much faster operation,

Previously there was often a 21 second delay between "Hit any key" and the first timed debug message after CCleaner was eventually closed,

but this is now consistently down to 6 or 7 Seconds.

 

Regards

Alan

trim_12.txt

Link to comment
Share on other sites

Unless you or others find a bug, I have no further improvements in mind.

 

Thanks for all your testing and comments.

 

I wanted to get WinApp2.ini SORTED before I even started on TRIM_*,

but my first attempts took far too long in execution - many minutes - so very long I thought that CMD.EXE had died.

So I gave up and focussed on getting TRIM to remove the entries that did not apply to a given computer.

 

It was only a few weeks ago that I realised why my first attempt was too slow.

I was reading the entire WinApp2.ini file one line at a time, and writing each line as a new variable in a double indexed array of variables,

and on completion of reading the input file I sorted the variables in memory and wrote as the output.

 

It worked beautifully as a concept, and for a cut-down WinApp2.ini with only one dozen entries,

but it turns out that to write a new variable with the next line causes CMD.EXE to re-write all its variables in memory,

so when the last line of 5729 lines is read,

there are 5728 linesof text = almost 188727 bytes of 5728 text lines to be re-written.

The environment memory space is re-written 5729 times altogether, and the actual amount increases with each line.

It is a square law - I would never have tried had I known this before.

 

My new approach involves a much smaller array of 781 variables HD_100001 through to HD_100781,

and this is array is removed from RAM once double indices have been added to WinApp2.ini to create #_INI_1.INI,

and #_INI_1.INI is then sorted on the indices and the text re-written - job done.

 

Regards

Alan

Link to comment
Share on other sites

OK then, we have the official v1.12 ;)

 

BTW, are you going to do a write up on what you can do with this like with EXCLUSIONS.TXT and prob others I have forgotten.

 

I will send you the EXE shortly. ;)

25qd6wl.jpg
Link to comment
Share on other sites

This still works as previously with exclusions.txt.

The only change to "inclusions" is that #_8_BAD_MINI.LST etc is no longer copied to the parent.

The person WinApp2.ini has done a good job of fixing the "Volatile Detections" and @_#_7_BAD_FULL.LST only has 7 volatiles for the whole set of 780 entries.

Link to comment
Share on other sites

  • 3 weeks later...

Alan....I have a request/suggestion

 

I found that i needed to just make sure the INI file was SORTED or SORT the INI file and go no further. Is there an update you can make to avaoid a CTRL/C to break the process?

25qd6wl.jpg
Link to comment
Share on other sites

Alan....I have a request/suggestion

 

I found that i needed to just make sure the INI file was SORTED or SORT the INI file and go no further. Is there an update you can make to avaoid a CTRL/C to break the process?

I counter your request with an alternative.

There is a guy with so much spare time he is constantly changing hats - lets ask him to sort the file before it gets posted :D

 

A quick possibility for you is to change one line of code, at line 50.

Original :-

IF %TRIM_NAME%==#_FIX.INI CALL :Sort_INI #_H1.TXT #_H2.TXT

Suggested (and untested) :-

IF %TRIM_NAME%==#_FIX.INI ( CALL :Sort_INI #_H1.TXT #_H2.TXT & EXIT /B )

This change should cause the script to terminate immediately after sorting and replacing the original file.

 

Please let me know if this is good for you.

Right now a am quite busy beating a new Windows installation into submission :lol:

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.