microsoft / microsoft/winget-cli

Windows11 System context deployment via Intune (MEM)

Open
#2,541 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

When trying to deploy winget via DISM (cmdlet below) it works, however when trying to run via System (psexec even) it doesn't return recognize the executable (no list of commands returned) when launching from the following path:
$env:ProgramFiles\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe"

winget system context install (works with v1.3.2091) on both W10 & W11:
DISM.exe /online /Add-ProvisionedAppxPackage /PackagePath:"\..\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" /SkipLicense

I'm well aware that the normal installation of WinGet on W11 is located under the %LocalAppData% for the user. How are we supposed to deliver winget packages via System context over Intune?

Steps to reproduce
  1. Launch cmd.exe using and then switch to powershell
    psexec.exe -s -i cmd.exe
  2. Install release using DISM
    DISM.exe /online /Add-ProvisionedAppxPackage /PackagePath:"\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" /SkipLicense
  3. Browse to the WinGet system path :
    $ResolveWingetPath = Resolve-Path "$env:ProgramFiles\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe"
    $WingetPath = $ResolveWingetPath[-1].Path
  4. Change directory using cd $wingetpath
  5. Try running .\winget.exe
  6. It wouldn't return anything as if the executable is broken. (Works perfectly fine for W10)
Expected behavior

Return the list of commands along with the summary about Winget CLI

Actual behavior

Returns nothing and System installs are broken.

Environment
Windows: Windows.Desktop v10.0.22000.978
System Architecture: X64

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Windows 11 behavior with psexec.exe, DISM.exe, PowerShell, and the winget.exe path under ProgramFiles\WindowsApps, then compare it with Windows 10. Verify the system-context launch and Intune deployment path described in the issue. Done means winget.exe returns its command summary and system-context package deployment works.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, devops, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.