Skip to content

feat(UninstallerType): detect Squirrel/Electron auto-updater installs (fixes half of #949)#951

Open
chirag127 wants to merge 1 commit into
BCUninstaller:masterfrom
chirag127:feat/detect-squirrel-installers
Open

feat(UninstallerType): detect Squirrel/Electron auto-updater installs (fixes half of #949)#951
chirag127 wants to merge 1 commit into
BCUninstaller:masterfrom
chirag127:feat/detect-squirrel-installers

Conversation

@chirag127

Copy link
Copy Markdown

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 UninstallString is a stable pattern:

"C:\Users\<user>\AppData\Local\<Vendor>\<App>\Update.exe" --uninstall -s

Today BCU classifies these as Unknown (there's no matching branch in UninstallerTypeAdder.GetUninstallerType), which loses useful signal in the UI and blocks per-type filtering.

Changes

  1. source/UninstallTools/UninstallerType.cs — add Squirrel enum value after PowerShell (+2 lines with the LocalisedName attribute).
  2. source/UninstallTools/Factory/InfoAdders/UninstallerTypeAdder.cs — new detection branch, mirrors the existing PowerShell / Chocolatey shape (+7 lines).
  3. source/UninstallTools/Properties/Localisation.resx — one string: UninstallerType_Squirrel"Squirrel (Electron)" (+3 lines).
  4. source/UninstallTools/Properties/Localisation.Designer.cs — matching accessor generated in the same style as UninstallerType_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

// Detect Squirrel / Electron auto-updater installs
// e.g. "C:\Users\<u>\AppData\Local\<Vendor>\<App>\Update.exe --uninstall -s"
// Discord, GitHub Desktop, Slack (classic), Teams (classic), many Electron apps
if (uninstallString.Contains("Update.exe", StringComparison.OrdinalIgnoreCase)
    && uninstallString.Contains("--uninstall", StringComparison.OrdinalIgnoreCase)
    && uninstallString.Contains(@"\AppData\Local\", StringComparison.OrdinalIgnoreCase))
    return UninstallerType.Squirrel;

The \AppData\Local\ clause avoids the (rare) case of a legit non-Squirrel Update.exe --uninstall living in Program Files or another install root.

Out of scope

Related

Fixes half of #949 (detection half; junk-scan half left open there).

Test plan

  • Build source/BulkCrapUninstaller.sln
  • Scan a machine with Discord, GitHub Desktop, or Slack Classic installed
  • Confirm the affected rows now show "Squirrel (Electron)" in the "Uninstaller type" column instead of "Unknown"
  • Confirm all other rows are unchanged

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants