topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • October 21, 2019, 12:50 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: SquidGirlCleaner: open source superseded update (re)mover - testers wanted!  (Read 3470 times)

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Hello there :)

As some of you may be aware, Windows' "C:\Windows\Installer" folder tends to grow increasingly larger as time passes and more updates get applied to programs which rely on Windows Installer — especially if you've had the same version of Microsoft Office for a few years and let Windows Update do its thing automatically.

There are various solutions to this problem such as:

  • reinstalling the system from scratch: huh, overkill much?
  • completely uninstalling the big programs/software suites that had multiple updates in the past, and reinstalling them (if still needed) with only the latest, current patches: while less overkill than a complete system reinstall, it's still not a very practical solution
  • moving the folder to a different drive and making a hard link to it: may not always be feasible, especially if you have a laptop with no room to add another internal storage drive… also, while that's kind of clever, it's only a workaround that doesn't really address the main problem
  • using a dedicated cleaning tool such as PatchCleaner: IMHO, that appears to be the best option

However, some people may have trust issues with PatchCleaner because it is closed source.

So, since I was curious about how that worked, I tried to figure out how to identify superseded patches and started to script my own, open source (it's a .bat file, not obfuscated) solution that should give similar results — albeit with a much less sexy interface and less options, but the more suspicious people can actually inspect the code!

A few words of caution, though:
  • I've only tested it on a few computers so far, all running the same version of Windows (7)
  • while I've not noticed any issue after using my script to "clean up" those (again very few) computers I did test it on, and had no problem applying the august 2019 security updates for MS Office 2010/2013 on them, I cannot tell for sure if there won't be issues later on
  • I'm not even a programmer, which I guess increases the probability for this script to not be extremely reliable ^^'

This is why I need testers, preferably technically inclined ones for now, so that if my script causes an issue, they're more likely to be able to clearly explain it and maybe even solve it by themselves.

With that being said, the script is in the attachment.

Feel free to reply with any constructive criticism!
« Last Edit: August 27, 2019, 04:39 PM by ConstanceJill, Reason: Updated version, should fix issues with Adobe Reader (hopefully) »

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Found three orphans at 78MB in total.

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
That's not much. Was your system installed recently? Do you perhaps not have MS Office on it? Or maybe you used another cleaning tool already which may have removed most of the unneeded updates?

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 70
    • View Profile
    • Donate to Member
Installed around ten months back.

No MS office installed. I have not had a need for it since I graduated from college.

And yes the system has been cleaned before.

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Hmm while re-reading my own code, I noticed a bug in one of the functions (regread): while attempting to optimize it after debugging it, I went a bit overzealous and removed the line that set the "Value" variable, which would have been used if we tried to read the data from any registry value with 1 or more spaces in its name.

However none of the registry values we need to read has any, which is why it has no effect on the outcome of the script, so that alone is not worth publishing an updated version for. Still, it will be fixed in the "final" version.

Edit: found another minor bug: if the script was called by double clicking it instead of from an already opened command prompt, the script's window closes at the end, while it should stay open and pause to let the user read the statistics.
Again, it doesn't seem worth publishing an update yet, but will be fixed.
« Last Edit: August 16, 2019, 04:27 AM by ConstanceJill »

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,586
    • View Profile
    • Donate to Member
Same here. 3 Year old Win 10 installation with Office 2010 on it.

But in my case, I go out of my way to use portable applications and if not available, I'll try to make the application 'portable' myself and if that doesn't work, the application will be removed. Having said the above, it does require me to install stuff on a semi-regular basis, so I thought your script to be useful in finding out how much crap remains, even after software has been removed (using Revo UnInstaller). But that is the extent of cleaning I have done on this particular computer.

If it is of any help, your script returned 2 orphans, one of them was: ccc-utility64. The other: Microsoft SQL Server Data-Tier Application Framework (x86).

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
OK, thank you for letting me know the results :)

Hmm I don't know if it's an effect of the summer vacation or if I should have tried to scare people a bit less, but only 2 answers in 2 days seems a bit low. I also didn't expect the testers to have such clean systems already xD

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 8,836
    • View Profile
    • Donate to Member
I downloaded it and was going to test it, but the warning scared me off. :D

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Hmm perhaps I should replace the message with something like "it's advised to make a backup or your system before you use this script", and maybe remove the red background, then? ^^'

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Alright, I have news: I made a new version, which is significantly faster than the previous one.

The speed change is mostly due to a major change in the algorithm: instead of starting from the list of files in %windir%\Installer and, for each and every one of them, searching for a match through potentially hundreds of registry keys, we start by looking at the registry and creating lists of known files, and patches with their current state. Then we work with those lists' contents.

The new version is attached to this post. I'm not sure if I should (or even can) change the attachment to the initial post (?)
« Last Edit: August 27, 2019, 04:39 PM by ConstanceJill, Reason: Older version deleted »

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
OK, so it seems that there can indeed be issues after using my script when you try to update or uninstall Adobe Acrobat Reader (and possibly Adobe Acrobat "not Reader" too).

I had to use the Adobe Reader and Acrobat Cleaner Tool on one computer (running Windows 10, not sure if that makes a difference or not) because update 19.012.20040 wouldn't install and the program wouldn't uninstall either using Programs and Features :/ … I guess that's why PatchCleaner has it in its exclusion filter.

Edit: I updated Adobe Reader without issue on several computers where I had previously ran my script, all of them running Windows 7.
But on another one that runs Windows 10, I had the issue too.
So I guess the problem is somehow related to how msiexec works on Windows 10 (and perhaps 8, but I don't have access to any computer running this version).

I'll try to figure out a way to fix that. According to the error code (1646), seems likely to be related to the "Uninstallable" value for the last remaining patch, which is usually set to 0 instead of 1 for Adobe Reader patches.

Edited again: seems like it can also happen on machines running 7 after all, as it did on one of my home ones. Changing the data of the "Uninstallable" value of the latest successfully installed patch from "0" to "1" did allow the newest patch to install at the next attempt.
« Last Edit: August 26, 2019, 03:21 PM by ConstanceJill »

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Hello again to the 3 or so people who are following this thread :D

I've made an updated version again, which should (hopefully) prevent the issue of updating Adobe Reader, at least for the next update. Unfortunately I can not tell for sure that it won't crop up again for the second update after running the script :/

If a previous version of the script has already been ran on a system and Adobe Reader can't be updated or uninstalled any more because of it, running the new version should also fix it, as it will change the 'Uninstallable' value for the current patch(es) even if it doesn't clear any superseded one.

That new version shall be attached to the first post within a few seconds after the posting of this message.