MoscaDotTo / Winapp2

A database of extended cleaning routines for popular Windows PC based maintenance software.
Creative Commons Attribution Share Alike 4.0 International
783 stars 87 forks source link

[WinappDebug] Several false positives with current Winapp2 #159

Closed ROCKNROLLKID closed 6 years ago

ROCKNROLLKID commented 6 years ago

It seems there are several false positives with the current copy of Winapp2 using WinappDebug. Several say some entries need to be moved when they don't, while some say they need to be moved to the exact same spot (example: current line 1000, expected line 1000).

MoscaDotTo commented 6 years ago

Can you provide the output you're seeing problems with? I'm testing WinappDebug against the current winapp2.ini and I am not seeing any false positives. Typically if you see a matching expected and current positioning, there is a second line in the same entry that also needs to be moved, but WinappDebug is not smart enough to know the ending line position of commands who are out of place only because another line (or lines) is. These lines are typically fixed implicitly by correcting the line whose position differs from its expected. eg.

image

Here, correcting the position of FileKey5 (should be FileKey4 here) to line 7775 would mean implicitly that the line at 7775 would move to 7776. On a subsequent run of WinappDebug, these lines will be in the correct positions.

image

This is little quirk in the debugger that I left in primarily to make sure it didn't overlook anything in case the "needs to move left" method was too naive - most of the time the second pass outputs things implied by the first, but situations where a command needs to move, say, from the 2nd position to the final position will be more easily revealed. This is why the phrasing at the bottom says possible errors

ROCKNROLLKID commented 6 years ago

Ok, I did not know that about the (current 1000, expected 1000) thing.

About the false positives, I was referring a few that are like this:

FileKey12=%ProgramFiles%\IObit\Advanced SystemCare *.cab_Temp|.|REMOVESELF FileKey13=%ProgramFiles%\IObit\Advanced SystemCare |.log;.txt|RECURSE

WinappDebug says that 13 need to be 12 and thought this was wrong, however, looking closer I realized that 12 has a \ and WinappDebug detects that this should come before |. I guess this is correct?

Anyways I will close since this got straighten out.

MoscaDotTo commented 6 years ago

Yes, | takes precedence in WinappDebug over \

this is so that %SomeDir%|somefiles comes "alphabetically" before %SomeDir%\SomeOtherDir|somefiles

MoscaDotTo commented 6 years ago

I believe I have addressed this issue in the winapp2ool debugger module, I can't say it'll be 100% accurate 100% of the time, but it should point to the proper line now at least most of the time (with a tweaked message to indicate that the line is most likely out of place due to another line also being out of place)

image