winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

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

Open physics-archive opened this issue 1 year ago • 1 comments

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

  • Create a new Hyper-V VM with the latest Win11_23H2_English_x64v2.iso
  • Install psexec to open a terminal with system context
  • Delete Microsoft.DesktopAppInstaller from WindowsApps
  • Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile "C:\Windows\Temp\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
  • Add-AppxProvisionedPackage --Online -PackagePath "C:\Windows\Temp\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -SkipLicense

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

physics-archive avatar Aug 13 '24 23:08 physics-archive

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.

github-actions[bot] avatar Aug 13 '24 23:08 github-actions[bot]