A new build windows 11 and winget wasn’t working with error message below
Faulting application name: winget.exe, version: 1.17.2203.10001, time stamp: 0x622a8652
Faulting module name: WindowsPackageManager.dll, version: 1.17.2203.10001, time stamp: 0x622a8613
Exception code: 0xc0000005
Fault offset: 0x0000000000089bf3
Faulting process id: 0x0x261C
Faulting application start time: 0x0x1D9F73B86F2DDD1
Faulting application path: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.17.10691.0_x64__8wekyb3d8bbwe\winget.exe
Faulting module path: C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.17.10691.0_x64__8wekyb3d8bbwe\WindowsPackageManager.dll
Report Id: 626e7fb4-a059-4e81-9b6d-2b4e343d25a2
Faulting package full name: Microsoft.DesktopAppInstaller_1.17.10691.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: winget
We will need to “Package Up Winget” and deploy over the top if the version is under 1.6
Using the Microsoft Win32 Content Prep Tool, use an empty txt file to create a .intunewin file.
Install Command
powershell.exe -executionpolicy bypass -command "Add-AppxPackage https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
Uninstall Command
powershell.exe -executionpolicy bypass -command "Remove-AppxPackage -Package Microsoft.DesktopAppInstaller_8wekyb3d8bbwe"
Detection Policy for Winget
#Detection Policy
$version = winget -v
$version = $version.TrimStart("v")
$v = [version]$version
$netVerShort = "$($v.Major).$($v.Minor).$($v.Build)"
if ($netVerShort -gt "1.6") { write-host "Missing or Old Version" Exit 0 } else { Write-Host "File $file not found. Application not installed"
Exit 1 }
Install behavior User