{"id":7356,"date":"2023-10-05T04:51:16","date_gmt":"2023-10-05T04:51:16","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=7356"},"modified":"2023-11-14T23:03:31","modified_gmt":"2023-11-14T23:03:31","slug":"winget-error","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/winget-error","title":{"rendered":"Winget Error &#8211; Deploy Winget Upgrade via Intune"},"content":{"rendered":"\n<p>A new build windows 11 and winget wasn&#8217;t working with error message below <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">Faulting application name: winget.exe, version: 1.17.2203.10001, time stamp: 0x622a8652\nFaulting module name: WindowsPackageManager.dll, version: 1.17.2203.10001, time stamp: 0x622a8613\nException code: 0xc0000005\nFault offset: 0x0000000000089bf3\nFaulting process id: 0x0x261C\nFaulting application start time: 0x0x1D9F73B86F2DDD1\nFaulting application path: C:\\Program Files\\WindowsApps\\Microsoft.DesktopAppInstaller_1.17.10691.0_x64__8wekyb3d8bbwe\\winget.exe\nFaulting module path: C:\\Program Files\\WindowsApps\\Microsoft.DesktopAppInstaller_1.17.10691.0_x64__8wekyb3d8bbwe\\WindowsPackageManager.dll\nReport Id: 626e7fb4-a059-4e81-9b6d-2b4e343d25a2\nFaulting package full name: Microsoft.DesktopAppInstaller_1.17.10691.0_x64__8wekyb3d8bbwe\nFaulting package-relative application ID: winget<\/code><\/pre>\n\n\n\n<p>We will need to &#8220;Package Up Winget&#8221; and deploy over the top if the version is under 1.6<\/p>\n\n\n\n<p>Using the&nbsp;<a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2065730\">Microsoft Win32 Content Prep Tool<\/a>, use an empty txt file to create a .intunewin file.<\/p>\n\n\n\n<p>Install Command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">powershell.exe -executionpolicy bypass -command \"Add-AppxPackage https:\/\/github.com\/microsoft\/winget-cli\/releases\/latest\/download\/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle\"<\/code><\/pre>\n\n\n\n<p>Uninstall Command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">powershell.exe -executionpolicy bypass -command \"Remove-AppxPackage -Package Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\"<\/code><\/pre>\n\n\n\n<p>Detection Policy for Winget<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">#Detection Policy \n$version = winget -v\n$version = $version.TrimStart(\"v\")\n$v = [version]$version\n$netVerShort = \"$($v.Major).$($v.Minor).$($v.Build)\"\n\nif ($netVerShort -gt \"1.6\") { write-host \"Missing or Old Version\"   Exit 0 } else { Write-Host \"File $file not found. Application not installed\"\nExit 1 }<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/10\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"560\" src=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/10\/image-1024x560.png\" alt=\"\" class=\"wp-image-7357 img-responsive\" srcset=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/10\/image-1024x560.png 1024w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/10\/image-300x164.png 300w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/10\/image-768x420.png 768w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2023\/10\/image.png 1055w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p><strong>Install behavior User<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A new build windows 11 and winget wasn&#8217;t working with error message below We will need to &#8220;Package Up Winget&#8221; and deploy over the top if the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7356","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=7356"}],"version-history":[{"count":3,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7356\/revisions"}],"predecessor-version":[{"id":7441,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7356\/revisions\/7441"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=7356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=7356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=7356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}