Jump to content

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


Alan_B

Recommended Posts

Alan...Good News and Bad News.

 

Trim_4 works fine on x86. I compared the finished INI and matches what I created with a previous build.

 

Not so good on x64.

 

Once Trim_4.BAT is executed, there is a pause the hit ENTER to continue. Once you hit ENTER, CCleaner launches and the script does not wait for you to run Analyze and close CCleaner, but just continues:

e5e82315d6.jpg

 

It also seems like the script is running the x86 version of CCleaner and not x64 version:

   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 ...
15:25:26.23 - 15:25:26.17  = 5552623 - 5552617  = 60 mSec	   = Running "CCLEANER.EXE /DEBUG"   <<<===========
15:25:26.28 - 15:25:26.23  = 5552628 - 5552623  = 50 mSec	   = Built #_NEEDED.LST

 

Now...a suggestion for you if you choose to.

Change TECHNIQUE :- section to this:

INSTRUCTIONS:
- Run TRIMx.BAT (not sure what the final number will be...maybe leave it as TRIM)
- CCleaner is LAUNCHED automatically.
- Click "Analyze" and when done, EXIT 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, EXIT CCleaner then trimmed Winapp2.ini replaces the "Default=True".
- Now copy the NEW trimmed WinApp2.ini to your normal CCleaner installation.

25qd6wl.jpg
Link to comment
Share on other sites

OOPS

 

Apparently there is a hiccup when CCleaner.exe is found and launched and it decides to transition to the CCleaner64.exe version.

I see that now when I start from scratch ( by deleting CCleaner.ini ).

 

My previous tests had CCleaner.ini with only the first few items that prevented the annoying "Intelligent Scan ..." pop-up and remebered Windows sizes.

 

Sorry, too close to midnight to be fixed today.

Back tomorrow.

 

Thanks for suggestion, I will fix an auto correct identity for Trimxxx.bat

 

Regards

Alan

Link to comment
Share on other sites

Trim_5 attached.

 

This now determines from SysWow64 which is the natural default version for CCleaner,

and uses this if available, otherwise it uses whatever it can find.

 

It also initialises CCleaner.ini if absent so that the Cookies Wizard does not pop-up.

 

Alan

Trim_5.txt

Link to comment
Share on other sites

Unless I'm doing something wrong (which could be), it still doesn't work for me on my x86 machine. Does this only work with CCleaner portable (mine's installed)?

I pointed out your error in post #14, and to prevent others from doing so my script starts by telling you

FILE CREATION 12:13 02/01/2012

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.

 

Tr3bg0D has advised you correctly.

I suspect your system has survived but you MIGHT need to totally un-install CCleaner and do a fresh install.

 

INTENDED OPERATION of my script :-

 

It depends upon a CLEAN start which has never at any time had any Winapp2.ini check-box altered.

The latest 163 kB download has 678 entries, each of which has been disabled for your safety by

Default=False

 

In the past I believe the user was responsible for his own safety and needed to MANUALLY uncheck any boxes that were too risky,

and CCleaner permanently remembers WHAT has been MANUALLY configured.

 

My script uses the exact opposite, it changes each and every "Default=False" into "Default=True" and it announces

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

Please note that if you disobey and "Run Cleaner" then you will have deleted everything possible no matter how risky,

and I do not know if this could also prevent the /debug option from capturing the information needed by my script.

 

Please note that if you do this in a pre-existing CCleaner folder, any previous MANUALLY unchecked boxes will be remembered,

and that such items will NOT be seen by the /debug option and the output WinApp2.ini will NOT give you such boxes,

which means you can NOT reconsider and decide to risk cleaning them.

 

Then it launches CCleaner

 

After this it is expected that /debug will have created a file such as CCleaner64_11-12-2011_15-41-16.log

and hopefully you should see something like

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


You still have present a very dangerous WinApp2.ini which defaults to erasing everything possible, UNLESS you see something like

12:09:20.63 - 12:09:20.57 = 4376063 - 4376057 = 60 mSec = Built #_NEEDED.LST

 

My script concludes with something like

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


If you see anything similar to

Counted 57-2 = 55 Config Blocks with 2 Repetition Anomalies

then the script has done its job and captured "55 Config Blocks" or whatever number it reports for your system.

 

If the script has done its job, but your CCleaner is not getting the benefit,

it may well be due to a conflict with its previous history,

ESPECIALLY if you use the installed version which saves setting in the registry.

 

On the bright side, your mistake is not as costly as one made by my work colleague.

He filled up his diesel car from the the petrol pump,

£50 to pay for the useless petrol now contaminated with diesel dregs,

£100 to pay for the specialist firm that came out with a tanker to drain his tank,

and then dispose of in conformance with Health and Safety etc regulations.

£150 down and several hours stranded at the petrol station before he could fill up and pay again :angry:

Link to comment
Share on other sites

The Trim_? script accommodates various anomalies in WinApp2.ini.

Unfortunately Volatile Detections may fail to be detected.

The result is that when using the full 163 KB download, there are 12 checkboxes that disappear after cleaning,

and if the user decides to uncheck it is too late - the boxes have gone.

 

Using the trimmed version, if this is done on a clean system then the volatiles will not register and will not be included.

The good news is that after the system gets dirty and you process a new 163 kB download, they should be registered and included in the trimmed version

 

In practice my system only suffers from these two

HKCU\Software\Microsoft\Windows\ShellNoRoam\MUICache and

HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags

both of which get dirty and reappear within about 1 hour.

 

TestWini.bat gives an improved *.ini, and documents the volatiles thus in @_3_BAD_WinApp2.INI

1020 1142 {DetectFile} {%WinDir%\System32\Macromed\Flash|FlashInstall.log} WHOOPS - BAD DETECTION 1

1020 1144 {FileKey1} {%WinDir%\System32\Macromed\Flash|FlashInstall.log} BAD DETECTION ZAPPED 1

1518 4856 {Detect} {HKCU\Software\STOIK Smart Resizer 1.0\STOIK Smart Resizer\Recent File List} WHOOPS - BAD DETECTION 2

1518 4858 {RegKey1} {HKCU\Software\STOIK Smart Resizer 1.0\STOIK Smart Resizer\Recent File List} BAD DETECTION ZAPPED 2

1519 4862 {Detect} {HKCU\Software\STOIK Smart Resizer 2.0\STOIK Smart Resizer\Recent File List} WHOOPS - BAD DETECTION 3

1519 4864 {RegKey1} {HKCU\Software\STOIK Smart Resizer 2.0\STOIK Smart Resizer\Recent File List} BAD DETECTION ZAPPED 3

1521 4874 {Detect} {HKCU\Software\Trolltech} WHOOPS - BAD DETECTION 4

1521 4876 {RegKey1} {HKCU\Software\Trolltech} BAD DETECTION ZAPPED 4

1532 4950 {Detect} {HKLM\SOFTWARE\FullCircle\TalkBack} WHOOPS - BAD DETECTION 5

1532 4952 {RegKey1} {HKLM\SOFTWARE\FullCircle\TalkBack} BAD DETECTION ZAPPED 5

1608 5487 {Detect} {HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache\} WHOOPS - BAD DETECTION 6

1608 5489 {RegKey1} {HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache} BAD DETECTION ZAPPED 6

1609 5493 {Detect} {HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\} WHOOPS - BAD DETECTION 7

1609 5496 {RegKey2} {HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags} BAD DETECTION ZAPPED 7

1630 5658 {Detect} {HKLM\SOFTWARE\Microsoft\Tracing} WHOOPS - BAD DETECTION 8

1630 5660 {RegKey1} {HKLM\SOFTWARE\Microsoft\Tracing} BAD DETECTION ZAPPED 8

1634 5684 {Detect} {HKCU\Software\Microsoft\Windows\ShellNoRoam\MUICache} WHOOPS - BAD DETECTION 9

1634 5686 {RegKey1} {HKCU\Software\Microsoft\Windows\ShellNoRoam\MUICache} BAD DETECTION ZAPPED 9

1635 5690 {Detect} {HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags} WHOOPS - BAD DETECTION 10

1635 5693 {RegKey2} {HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags} BAD DETECTION ZAPPED 10

1639 5726 {Detect} {HKCU\Software\WinRAR SFX} WHOOPS - BAD DETECTION 11

1639 5728 {RegKey1} {HKCU\Software\WinRAR SFX} BAD DETECTION ZAPPED 11

1673 5959 {Detect} {HKCU\Software\Yahoo\Profiles} WHOOPS - BAD DETECTION 12

1673 5961 {RegKey1} {HKCU\Software\Yahoo\Profiles} BAD DETECTION ZAPPED 12

 

The reference numbers correspond to those shown in @_2_DEBUG_WinApp2.INI.

 

For now, until the detections are fixed, it is better to only trim after your system has had opportunity to get dirty.

TestWinni.txt

Link to comment
Share on other sites

  • Moderators

I uploaded a version of the file with trailing spaces removed, no other changes.

:blink: me thinks you copy pasted into the wrong winapp2 topic :P

 

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

Hopefully I am doing this right Alan. I just played with the TESTWINI.BAT and compared the WINAPP2.INI to the @_2_WINAPP2.INI and the only difference between both files are spacing or a carraige return.

25qd6wl.jpg
Link to comment
Share on other sites

Subtle differences may remain :)

 

Use Notepad and search for

[Corel VideoStudio Pro X4*]

the original download LOOKS LIKE

[Corel VideoStudio Pro X4*]LangSecRef=3023DetectFile=%ProgramFiles%\Corel\Corel VideoStudio Pro X4\vstudio.exeDefault=False...etc...etc...Excludekey1=FILE|%AppData%\Corel\Messages|*.policy

 

Most editors and file viewers and file comparators do not show this weird concatenation.

This is because they understand UNIX End Of Line which uses only 0x0a, instead of "DOS" 0x0d, 0x0a,

Notepad does not do UNIX.

Batch scripts run under CMD.EXE may suffer partial malfunction, depending upon what operations are attempted.

COPY is a good command that works on Unix files

 

MORE is different, and for me much better, it takes in either DOS or UNIX but always outputs in DOS mode.

Processing commences with the code

MORE %FILE% > @_DOS_%FILE%

and that produces the file

@_DOS_WinApp2.INI

 

Notepad should be able to see concatenation in the copy @_V0_WinApp2.INI which was made of the original download before it was first processed,

and should see absence of concatenation in @_DOS_WinApp2.INI,

and all the other @_*.* files are similarly "good" because they are based on @_DOS_WinApp2.INI.

 

Incidentally, when I select the files and examine properties

Size 162 KB (166,739 bytes) for @_V0_WinApp2.INI

Size 162 KB (166,747 bytes) for @_DOS_WinApp2.INI (Prefix 0x0d added to UNIX 0x0a, plus MORE appended an extra blank line at the end)

Size 162 KB (166,666 bytes) for @_2_WinApp2.INI ( 81 trailing spaces omitted )

 

Alan

Link to comment
Share on other sites

Hi!

 

I first thought that the latest "Trim_5" did not work on my system (Win7 x64). The same problem that was reported for "Trim_4" occurred: Once you hit ENTER, CCleaner launches and the script does not wait for you to run Analyze and close CCleaner.

 

The causer was the "User Account Control". If I use "run as administrator" on "Trim_5.bat" everything works fine (because UAC does not pop-up anymore). Maybe you can add an advice that "run as administrator" is required.

 

Thanks,

Michael

 

Edit: I was wrong, it only works if I open a "command prompt" as administrator and go to the folder using the "cd" command and then start "Trim_5.bat". Otherwise (using "run as administrator" directly on "Trim_5.bat") the winapp2.ini will not be found.

Link to comment
Share on other sites

Thanks for Feed-Back.

I will include your suggested advice when I finish work on another aspect of my code

 

I have to confess that UAC (and System Restore) are fully disabled on my Win7 64,

hence I never experience any such problems.

 

I do not need the aggravation of UAC etc. because I have Partition Image backup files that in theory will perfectly fix any non-hardware catastrophe,

and in practice have only been needed to fix Patch Tuesday and "Out of Band whatever emergency" Microsoft Updates that would have done their damage regardless of UAC.

Link to comment
Share on other sites

Yes, that is also top priority on my system. But every system I fix, I will leave UAC on. I much rather then be annoyed and think a bit vs having system problem. My wife and daughter got a new laptop recently and UAC is on for them.

 

@Alan - If you need some code to check for Admin Provilidge at the start of the script, just hollar and i'll search my archives.

25qd6wl.jpg
Link to comment
Share on other sites

@Alan - If you need some code to check for Admin Provilidge at the start of the script, just hollar and i'll search my archives.

If convenient then Yes please.

Otherwise I envisage concluding the script by asking if it ran, and upon a negative use that instance of CMD.EXE to invoke the script again subject to "Runas Administrator "

Link to comment
Share on other sites

.....you know how old age is. ;)

Tell me about it - No don't,

I am reminded about it every day when I have gone to the kitchen for a couple of things,

but having got there can only remember one of them :huh:

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.