MSI INSTALLFOLDER breaks Microsoft Update detection: MU offers all serviced builds, including the installed version · Issue #27898 · PowerShell/PowerShell · GitHub
Skip to content

MSI INSTALLFOLDER breaks Microsoft Update detection: MU offers all serviced builds, including the installed version #27898

Description

@smlfrysamuri

Prerequisites

Steps to reproduce

  1. Install PowerShell 7.6.5 (x64) via MSI to a non-default location on a non-system volume:
   msiexec /i PowerShell-7.6.5-win-x64.msi INSTALLFOLDER="X:\Program Files\PowerShell-7-x64\7"
  1. Ensure "Receive updates for other Microsoft products" is enabled.
  2. Run an online update scan.

Expected behavior

Microsoft Update detects the installed 7.6.5 and offers nothing, or offers only a genuinely
newer build.

Actual behavior

MU offers three PowerShell packages at once, including the exact version already installed:

    PowerShell v7.3.1 (x64)
    PowerShell v7.6.3 (x64)
    PowerShell v7.6.5 (x64)

7.6.3 and 7.3.1 fail on install. The offers return on every subsequent scan regardless of
outcome, including after a successful install.

Creating a directory junction at the default install path makes all three disappear on the
very next scan:

    mklink /J "C:\Program Files\PowerShell\7" "X:\Program Files\PowerShell-7-x64\7"

Nothing else changed between the two scans. This suggests MU detection probes a hard-coded
default path rather than reading HKLM\SOFTWARE\Microsoft\PowerShellCore\InstalledVersions or
the Windows Installer product registration, both of which were present and correct throughout.

Error details

Install failures:
    PowerShell v7.6.3 (x64)  -  0x80070643
    PowerShell v7.3.1 (x64)  -  0x8024200b

This is a detection failure, not supersedence (as postulated in possibly related issue #26046). 

Three points:

1. The already-installed version is offered. 7.6.5 was offered alongside the older builds
   while 7.6.5 was installed and correctly registered. No supersedence rule explains offering
   a package identical to what is installed. MU appears to conclude PowerShell is absent, so
   the catalog offers everything.

2. Installing an offered build does not stop it being re-offered. Update history shows 7.6.3
   installing successfully, then 7.6.5 74 seconds later, also successful:

       8/17/2026 10:50:52 PM   PowerShell v7.6.3 (x64)   ResultCode 2 (Succeeded)
       8/17/2026 10:52:06 PM   PowerShell v7.6.5 (x64)   ResultCode 2 (Succeeded)

   7.6.3 was offered again ten days later.

3. The MSI registration is healthy:

       ProductCode  : {499CA787-2899-40D2-A793-087E08EB227D}
       Name         : PowerShell 7-x64
       Version      : 7.6.5.0
       LocalPackage : C:\Windows\Installer\1485d9e1.msi
       CacheExists  : True

   HKLM\SOFTWARE\Microsoft\PowerShellCore\InstalledVersions is also correct:

       31ab5147-9a97-4452-8443-d9709f0516e1   7.6.5   X:\Program Files\PowerShell-7-x64\7\

   No orphaned product registrations, no dangling upgrade-code mappings. Reinstalling with
   REINSTALL=ALL REINSTALLMODE=vomus completes with "MainEngineThread is returning 0".

Ruled out:
- Standard WU remediation (stop wuauserv/cryptsvc, delete SoftwareDistribution and catroot2,
  SFC, DISM) has no effect.
- USE_MU=0 ENABLE_MU=0 applies cleanly, confirmed in the verbose log property table, and
  changes nothing. That property governs whether PowerShell registers for MU servicing, not
  whether MU can detect the install.

Suggested fixes:
- Have the MU applicability rules read PowerShellCore\InstalledVersions or the MSI product
  registration instead of probing a fixed filesystem path.
- Populate ARPINSTALLLOCATION from INSTALLFOLDER. InstallLocation is currently empty in
  Installer\UserData\...\InstallProperties and ARPINSTALLLOCATION never appears in a verbose
  install log. This one is entirely within the MSI's control.
- At minimum, document that INSTALLFOLDER is incompatible with Microsoft Update servicing.

I recognise the applicability rules are published service-side and may not be owned by this
repo. Happy to be redirected, but the ARPINSTALLLOCATION gap and the undocumented
INSTALLFOLDER incompatibility are MSI-side.

Possibly related to #26046, though that report appears to involve a default install path, so
the mechanism may differ.

Environment data

Name                           Value
----                           -----
PSVersion                      7.6.5
PSEdition                      Core
GitCommitId                    7.6.5
OS                             Microsoft Windows 10.0.26200
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Installed via MSI to X:\Program Files\PowerShell-7-x64\7 (local volume, not a network drive).

NOTE: ***Predates my move to the Insider channel.*** First appeared on a retail Windows 11 Pro build ~2 months ago, and persisted unchanged across the upgrade, so it is **not Insider-specific**.

Visuals

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions