microsoft / microsoft/winget-cli
Failure to install using DISM if App Installer isn't already present
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the documented Hyper-V and Windows 11 23H2 setup, then run Add-AppxProvisionedPackage against C:\Windows\Temp\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle. Start by reading MSIXBundle.log and comparing the failing image with the Windows Sandbox case and an image where Microsoft.DesktopAppInstaller is already present. Done means identifying whether the failure is caused by the MSIX bundle, the Windows image, or DISM and documenting or fixing the confirmed cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100