Skip to content

Fixes uninstall dispatch for EXE/Burn ARP entries whose registry subkey is GUID-shaped. - #57

Open
theKBro (theKBro) wants to merge 2 commits into
Devolutions:masterfrom
theKBro:fix/exe-bundle-msi-uninstall
Open

theKBro (theKBro) wants to merge 2 commits into
Devolutions:masterfrom
theKBro:fix/exe-bundle-msi-uninstall

Conversation

@theKBro

@theKBro theKBro (theKBro) commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Fixes uninstall dispatch for EXE/Burn ARP entries whose registry subkey is GUID-shaped. Such entries were incorrectly sent to msiexec, which could return error 1605 before Pinget tried the registered Burn uninstaller.

The problem was the selected uninstaller, not an incorrect exit code: a Burn bundle's GUID-shaped ARP key is not necessarily an MSI ProductCode.

Changes

  • Gate direct MSI uninstall dispatch on the matched ARP entry's WindowsInstaller DWORD being 1 in both Rust and .NET.
  • Read registry values when needed and check MSI eligibility at the ARP dispatch call site before invoking the MSI helper, without passing registry classification into that helper.
  • Keep MSI argument construction and exit-code handling unchanged.
  • Let non-MSI entries continue through their registered quiet or regular uninstall command.
  • Add regression coverage for missing, 0, and 1 WindowsInstaller values in both implementations.

I detected this when trying to uninstall python.

@theKBro

Copy link
Copy Markdown
Contributor Author

hey Marc-André Moreau (@mamoreau-devolutions) here is another one!
Thanks a lot for your work!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrow dispatch guards are consistent across implementations, with no blocking issues identified; tests were inspected but not executed.

No open issues 🎉

What changed in this PR

Fixes uninstall dispatch so GUID-shaped EXE/Burn registry keys are not mistaken for MSI product codes.

Changes:

  • Require WindowsInstaller DWORD 1 for direct MSI dispatch in Rust and .NET.
  • Preserve registered uninstall-command fallback and existing MSI behavior.
  • Add tests for missing, 0, and 1 values.
File Description
rust/​crates/​pinget-core/​src/​lib.rs Adds the MSI eligibility guard and regression tests.
dotnet/​src/​Devolutions.Pinget.Core/​InstallerDispatch.cs Adds the matching .NET eligibility guard.
dotnet/​src/​Devolutions.Pinget.Core.Tests/​CoreTests.cs Tests .NET registry-value classification.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants