← Back to Pull requests

fix(packaging): MSI stays registered after uninstalling a legacy System32 install (ROCM-35150) #10380

Closed
unknown closed this pull request without merging on Dec 02, 2026 12:53 UTC
View on GitHub
unknown unknown commented on Nov 30, 2026 20:16 UTC
Author

Motivation:


Installing the runtime MSI with LEGACY_SYSTEM32_INSTALL=1 and then uninstalling it removes the install directory but leaves the product in Add/Remove Programs.

The LegacyInstall feature defaults to Level 0 and is only raised to 1 by the condition LEGACY_SYSTEM32_INSTALL = "1". That property is not persisted, so on uninstall the condition is false and the feature drops back to Level 0. Windows Installer does not remove level-0 features on REMOVE=ALL, so the feature stays installed and the product stays registered. The verbose log shows it as Feature: LegacyInstall; Installed: Local; Request: Null; Action: Null.

Fix:


guard the Level conditions so they can't change after install. LegacyInstall uses Installed OR ..., and the two lowering cases (LegacyCleanup, LongPaths) use NOT Installed AND ... so the same thing can't happen when those properties are passed on uninstall.

With this, uninstalling a legacy install also removes its System32 copies (desired behaviour), matching how a default install already scrubs those names. The README is updated to describe that.

Verified with two minimal per-user WiX packages: the old condition leaves the product registered after /x, the new one removes it cleanly.

Also adds a regression test for the guard rule and makes the uninstall test check the Uninstall hive, which is what would have caught this.

Workaround for already-affected machines: msiexec /x amdrocm-runtime.msi /qn LEGACY_SYSTEM32_INSTALL=1.

Tracked in
JIRA ID : ROCM-35150

Test Results:


https://github.com/ROCm/TheRock/actions/runs/46705777616

| Mode | Install | Uninstall |
| --- | --- | --- |
| Default | 7 payload files under core-10.3, System32 scrubbed, discovery key correct | product unregistered, install dir and discovery key removed |
| LEGACY_SYSTEM32_INSTALL=1 | 12 payload files (7 + 5 System32 copies), discovery key correct | product unregistered, install dir and discovery key removed, System32 scrubbed |

🤖 Generated with Claude Code

Diff: 262 lines (+196 / -66) across 3 files Reviewer: ScottTodd Review duration: 2436m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 262 lines diff across 3 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.333
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #10380"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.3% (MEDIUM) · Higher = larger blast radius
39.3%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.5% · Safe to merge
15.5%
Repository