feat(UninstallerType): detect Squirrel/Electron auto-updater installs (fixes half of #949)#951
Open
chirag127 wants to merge 1 commit into
Open
Conversation
A common class of modern Windows apps (Discord, GitHub Desktop, Slack
classic, Teams classic, many Electron apps) use the Squirrel installer
framework. Their UninstallString is a stable pattern:
%LocalAppData%\<Vendor>\<App>\Update.exe --uninstall -s
Today BCU classifies these as Unknown. This adds a Squirrel value to
UninstallerType and a small detection branch in UninstallerTypeAdder,
mirroring the existing Chocolatey/Oculus/PowerShell pattern. Junk-scan
hookup (Squirrel case in SpecificUninstallerKindScanner) is left for
a follow-up so this change stays surgical.
Fixes half of BCUninstaller#949.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds detection for Squirrel / Electron auto-updater installers, a common class of modern Windows apps (Discord, GitHub Desktop, Slack classic, Teams classic, many Electron apps).
Their
UninstallStringis a stable pattern:Today BCU classifies these as
Unknown(there's no matching branch inUninstallerTypeAdder.GetUninstallerType), which loses useful signal in the UI and blocks per-type filtering.Changes
source/UninstallTools/UninstallerType.cs— addSquirrelenum value afterPowerShell(+2 lines with theLocalisedNameattribute).source/UninstallTools/Factory/InfoAdders/UninstallerTypeAdder.cs— new detection branch, mirrors the existingPowerShell/Chocolateyshape (+7 lines).source/UninstallTools/Properties/Localisation.resx— one string:UninstallerType_Squirrel→"Squirrel (Electron)"(+3 lines).source/UninstallTools/Properties/Localisation.Designer.cs— matching accessor generated in the same style asUninstallerType_PowerShell(+9 lines).Total: 23 lines added, 1 replaced across 4 files. No behavioural change for any existing uninstaller — Squirrel apps previously matched no branch and returned
Unknown.Detection logic
The
\AppData\Local\clause avoids the (rare) case of a legit non-SquirrelUpdate.exe --uninstallliving inProgram Filesor another install root.Out of scope
SpecificUninstallerKindScannerdoesn't yet have a Squirrel case (%LocalAppData% leftovers,SquirrelTempfolders,stubexecutableshortcuts). Leaving as a follow-up so this PR stays surgical and reviewable.winget install Discord.Discord) — see Prefer package-manager uninstall (winget / scoop / choco) over vendor uninstaller when app was installed via one #948, separate concern.Related
Fixes half of #949 (detection half; junk-scan half left open there).
Test plan
source/BulkCrapUninstaller.sln