Repository navigation
Resolve MSI installed scope from native installation context - #6644
Open
greyhair-atx (greyhair-atx) wants to merge 2 commits into
Open
greyhair-atx (greyhair-atx) wants to merge 2 commits into
greyhair-atx (greyhair-atx) wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
This comment has been minimized.
This comment has been minimized.
Open
7 of 8 tasks
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.
📖 Description
Resolve MSI installation scope using Windows Installer context instead of inferring it solely from the ARP registry hive. A user-unmanaged MSI can appear under HKLM, causing WinGet to reject
--scope useror select a machine installer during an unscoped upgrade.Enumerate current-user and machine registrations once per inventory helper, cache case-insensitive ProductCode/context mappings, and filter both ARP hives by the resolved scope. Preserve hive-based behavior for non-MSI entries. Missing/ambiguous MSI context and enumeration errors fail closed by omitting affected MSI inventory rather than guessing a scope. This conservative inventory change deserves particular review; it does not repair MSI transaction rollback.
🔗 References
Addresses #3011. Reproduction and published installer identities: #3011 (comment).
🔍 Validation
[msiscope],[arphelper],[manifest_comparator],[installed]: 45 cases / 1,521 assertions locally; 45 / 1,289 on the Windows 11 disposable VM's standard-user interactive session. Local selection repeated successfully before submission.upgrade --all, all supported Windows releases, or general installer failure recovery. Separate forced-failure MSI tests did not restore complete registration; this PR makes no rollback-safety claim.✅ Checklist
🤖 AI Assistance
AI assistance contributed the implementation, regression tests, disposable-VM test orchestration and this description. The contributor remains responsible for review and validation.
📋 Issue Type
Microsoft Reviewers: Open in CodeFlow
Spelling follow-up: commit b7de1ab acknowledges five Windows Installer API/test terms in the existing dictionary. Executable code is unchanged. The CLA and spelling checks passed; native Azure Pipelines validation still awaits an authorized upstream maintainer.