microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.25k stars 1.45k forks source link

Failure to install using DISM if App Installer isn't already present #4733

Open physics-archive opened 2 months ago

physics-archive commented 2 months ago

Brief description of your issue

[Context] Some recently-reimaged devices are missing Microsoft.DesktopAppInstaller, both during and after OOBE. My experience is that this package (v1.17.10691) ships with Windows (up to 23H2), and I never see OOBE devices without a provisioned copy in C:\Program Files\WindowsApps. MS Learn also confirms this observation, stating it ships with Windows.

[Problem] During OOBE, our devices run a PowerShell script to download and provision the latest App Installer package; 1,000+ deployments with no issue, until recently (07/29). For clients missing the (v1.17.10691) package following Windows Reset: invoking Add-AppxProvisionedPackage to install the app's latest MSIXBUNDLE fails, throwing "The system cannot find the path specified." DISM Log found in Actual Behavior section.

DISM is the only tool I know of to install Appx packages with system-context, and this works fine in environments where Microsoft.DesktopAppInstaller is already present (i.e., the expected environment). Yet this installation also works on 11's Sandbox which doesn't ship with any version of the app. Am I missing something, or is there a problem with the .MSIXbundle or these images of Windows?

Steps to reproduce

This errors occur whether user has installed dependencies (vc_redist.x64) or not.

Expected behavior

Expectation: Unpack Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle to C:\Program Files\WindowsApps. The latest winget.exe should be immediately accessible, which is what happens when I upgrade devices from (v1.17.10691) to Latest.

In Windows 11 Sandbox, which ships without C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller..., the behavior is a clean installation of the .msixbundle; winget.exe becomes fully functional in system- and user-contexts.

Actual behavior

Add-AppxProvisionedPackage : The system cannot find the path specified.

Attached are the DISM (cmdlet) logs which contain more than just path exceptions. Maybe if someone can help me understand what's going on within this log? MSIXBundle.log

VCLibs and MsXaml provision without issue, so this problem is so far limited to DesktopAppInstaller.

Environment

Windows Package Manager v1.8.1911 (version of the msix installer)
Windows: Windows.Desktop v10.0.22631.3880
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.0
github-actions[bot] commented 2 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.