Open Matt-C22 opened 2 years ago
Thanks @Trenly for dropping those. I've been through them actually during the past weeks, however I mentioned that it does work for W10 using System account by browsing to the %ProgramFiles% install path of winget, that gets added via DISM, since Add-AppxPackage is not available.
On W11 the executable simply doesn't budge when it's launched. It's not about winget
not getting recognized in the system context as it does in the user one thanks to the PATH
variable.
Also related:
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
psexec.exe -s -i cmd.exe
DISM.exe /online /Add-ProvisionedAppxPackage /PackagePath:"\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" /SkipLicense
$ResolveWingetPath = Resolve-Path "$env:ProgramFiles\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe"
$WingetPath = $ResolveWingetPath[-1].Path
cd $wingetpath
.\winget.exe
Expected behavior
Return the list of commands along with the summary about Winget CLI
Actual behavior
Returns nothing and System installs are broken.
Environment