Skip to content

Verify installed version matches upgrade target after installer success#6097

Open
AMDphreak wants to merge 1 commit intomicrosoft:masterfrom
AMDphreak:fix/verify-upgrade-installed-version
Open

Verify installed version matches upgrade target after installer success#6097
AMDphreak wants to merge 1 commit intomicrosoft:masterfrom
AMDphreak:fix/verify-upgrade-installed-version

Conversation

@AMDphreak
Copy link

@AMDphreak AMDphreak commented Mar 21, 2026

Summary

Follow-up to misleading success output when an upgrade exits 0 but Windows still reports an older installed version (see #4550 and related reports).

Behavior

After a successful installer return code, if the operation is an upgrade (InstallerExecutionUseUpdate):

  • ARP path: After ARP correlation finds the installed package, compare Utility::Version of the correlated installed version to the manifest package version. If the installed version sorts less than the expected (manifest) version, fail with APPINSTALLER_CLI_ERROR_UPGRADE_INSTALLED_VERSION_MISMATCH (0x8A15008F).
  • MSIX path: When the manifest provides a package family name and the package is registered, compare using Deployment::GetInstalledVersionStringForFamilyName where applicable.
  • Skip verification when reboot is required to finish, when versions are unknown, or when correlation does not yield a reliable installed version string.

Notes

Portable/zip flows that do not correlate to ARP/MSIX are unchanged.

Testing

CI / AppInstallerCLITests as usual.

Made with Cursor

Microsoft Reviewers: Open in CodeFlow

When upgrading, compare the version reported by Windows (ARP correlation or
MSIX package family registration) to the manifest package version after the
installer exits successfully. If the installed version is still lower, emit
APPINSTALLER_CLI_ERROR_UPGRADE_INSTALLED_VERSION_MISMATCH.

Skips verification when reboot is required to finish (version may not update
until restart) or when either version is unknown.

Does not cover installers that do not participate in ARP/MSIX correlation
(e.g. some portable flows); those remain unchanged.

Related: microsoft#4550
@AMDphreak AMDphreak marked this pull request as ready for review March 21, 2026 09:55
@AMDphreak AMDphreak requested a review from a team as a code owner March 21, 2026 09:55
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.

1 participant