README.md (10839B)
1 # Troubleshooting 2 3 ## How do I get the Windows Package Manager? 4 5 ### Prerequisites 6 7 The first thing to check is which version of Windows 10 you have. 8 9 [Check your version of Windows](https://support.microsoft.com/windows/see-which-version-of-windows-10-you-have-12d35019-4da9-0cb1-ba47-f8b031b712ad). 10 11 The Windows Package Manager requires at least Version 1809 (October 2018 Update). 12 13 The next requirement is ensuring you have the [App Installer](https://apps.microsoft.com/detail/9nblggh4nns1) from the Microsoft Store. The Windows Package Manager is delivered as an MSIX package. The App Installer is required to install MSIX packages on Windows 10. 14 15 >Note: The Windows Package Manager is shipped with later versions of the App Installer. 16 17 ### Stable Releases 18 19 The first stable release of the Windows Package Manager was v1.0.11451. This release was **not** published as an automatic update to all Windows 10 users on a supported version of Windows 10. This was an intentional decision made to provide enterprise customers (IT Professionals) sufficient time to configure and deploy Group Policy for the Windows Package Manager. 20 21 Customers may install the [latest stable release](https://github.com/microsoft/winget-cli/releases/latest/) directly from the GitHub repository. These packages are signed, and customers will receive automatic updates if IT Policy does not block the Microsoft Store. 22 23 ### Developer Releases (Pre-Release) 24 25 >Note: There is a known problem restoring the client to the latest stable App Installer release. We will be distributing the latest stable builds and providing instructions once they are made available. 26 27 During the initial Windows Package Manager Preview period, releases were distributed to all Windows Insider channels. Customers who [sign up](http://aka.ms/winget-InsiderProgram) to become members of the Windows Package Manager Insider program also receive pre-release builds. The final process for inclusion into the program requires manual steps, so the App Installer update may not be available for a few days **after** receiving their e-mail notification. 28 29 Customers may install any [release](https://github.com/microsoft/winget-cli/releases/) including pre-release builds directly from the GitHub repository. These packages are signed, and customers will receive automatic updates if IT Policy does not block the Microsoft Store. 30 31 >Note: Insiders will receive updates to the latest build (stable or pre-release) if IT Policy does not block the Microsoft Store. Other customers will receive updates to the latest stable build once a newer stable version is published if IT Policy does not block the Microsoft Store. 32 33 Only the Windows Insider DEV channel will continue receiving pre-release builds of the Windows Package Manager after v1.0.11451. Other Windows Insider channels will only receive stable release candidates or updated versions of the Windows Package Manager with critical bug fixes. 34 35 ### Machine-wide Provisioning 36 37 The Windows Package Manager can be provisioned machine-wide or for each new user. The following PowerShell cmdlet can be used to provision the package machine-wide. The latest Windows Package Manager release and license can be downloaded directly from the GitHub repository. It is dependent on the [Microsoft.VCLibs](https://docs.microsoft.com/troubleshoot/cpp/c-runtime-packages-desktop-bridge) desktop framework package, which needs to be downloaded and specified in the dependency path option in the cmdlet. 38 39 >`Add-AppxProvisionedPackage -online -PackagePath <desktop AppInstaller msixbundle package path> -LicensePath <license path> -DependencyPackagePath <Microsoft.VCLibs package path>` 40 41 After the package is provisioned, the users need to log into their Windows account to get the package registered and use it. 42 43 ## Common Issues 44 45 ### Executing `winget` exits with no message 46 47 If no output is displayed, it is likely that the version of WinGet on your system is using a retired Content Delivery Network (CDN). 48 You can check which version of WinGet is on your machine using `winget --info`. If the version is lower than `1.6.3482`, take the following troubleshooting steps. 49 50 1. Install the latest version of WinGet using one of the below methods 51 * a. Through the Microsoft Store by installing the latest version of [App Installer](https://apps.microsoft.com/detail/9NBLGGH4NNS1) 52 * b. Through installing the MSIX package found in the [GitHub releases](https://github.com/microsoft/winget-cli/releases) 53 * c. Through installing the MSIX package from https://aka.ms/getwinget 54 2. Force a source update using `winget source update` 55 56 If the above guidelines do not resolve the problem, please open an issue with details of the Windows version and App Installer version you are using. 57 58 ### Executing `winget` doesn't display help 59 60 The following errors are displayed when executed in CMD. 61 `The system cannot execute the specified program.` 62 or 63 64 ``` 65 'winget' is not recognized as an internal or external command, 66 operable program or batch file. 67 ``` 68 69 The following errors are displayed when executed in PowerShell. 70 71 ``` 72 winget : The term 'winget' is not recognized as the name of a cmdlet, function, script file, or operable program. 73 Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 74 At line:1 char:1 75 + winget 76 + ~~~~~~ 77 + CategoryInfo : ObjectNotFound: (winget:String) [], CommandNotFoundException 78 + FullyQualifiedErrorId : CommandNotFoundException 79 ``` 80 or 81 82 ``` 83 Program 'winget.exe' failed to run: The file cannot be accessed by the systemAt line:1 char:1 84 + winget 85 + ~~~~~~. 86 At line:1 char:1 87 + winget 88 + ~~~~~~ 89 + CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException 90 + FullyQualifiedErrorId : NativeCommandFailed 91 ``` 92 93 The following error is displayed when executed in Windows Terminal's Powershell profile. 94 95 ``` 96 winget : The term 'winget' is not recognized as the name of a cmdlet, function, script file, or operable program. 97 Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 98 At line:1 char:1 99 + winget 100 + ~~~~~~ 101 + CategoryInfo : ObjectNotFound: (winget:String) [], CommandNotFoundException 102 + FullyQualifiedErrorId : CommandNotFoundException 103 ``` 104 105 These errors most commonly occur for one of following reasons. Please try out the following troubleshooting steps. 106 1. The App Installer does not contain the Windows Package Manager. You should check to ensure the version of App Installer is greater than 1.11.11451. You can check by executing the following command in PowerShell: 107 108 >`Get-AppxPackage microsoft.desktopappinstaller` 109 110 2. The App Execution Alias for the Windows Package Manager is disabled. You should enable the App Execution Alias for the Windows Package Manager. Go to `App execution aliases` option in `Apps & features Settings` to enable it. 111 3. The App Installer did not automatically add the PATH environment variable. You should add the path environment variable. The value to add is "%userprofile%\AppData\Local\Microsoft\WindowsApps". You can verify this by running `%LOCALAPPDATA%\Microsoft\WindowsApps\winget` from a command-prompt or `& "$env:LOCALAPPDATA\Microsoft\WindowsApps\winget"` from a powershell. If the command runs then, but not before, then you very likely have a missing PATH environment component. 112 4. Apps deployed on the machine are registered per user by default. If App Installer was installed on a different user account than the one you are trying to run it on, you will have to reinstall it again on this account and try again: 113 1. Get the `PackageFullName` of your installed `App Installer` package (PowerShell): `Get-AppxPackage Microsoft.DesktopAppInstaller | Select Name, PackageFullName`. 114 2. `Add-AppxPackage -register "C:\Program Files\WindowsApps\{PackageFullName}\appxmanifest.xml" -DisableDevelopmentMode` (where `{PackageFullName}` is the info from the previous point). 115 3. Toggle the App Execution Alias for winget, again (see above). 116 117 If the above guidelines do not resolve the problem, please open an issue with details of the Windows version and App Installer version you are using. 118 119 ## Common Errors 120 121 #### Error 0x80072efd 122 123 This error is related to networking and maps to "ERROR_INTERNET_CANNOT_CONNECT". It could be related to TLS (Transport Layer Security). 124 125 This issue may be resolved by enabling TLS 1.2. 126 127 It may also be resolved by flushing your DNS cache. Instructions are available at [Microsoft Learn](https://learn.microsoft.com/windows-server/administration/windows-commands/ipconfig). 128 129 130 #### Error 0x801901a0 131 132 This error is related to Delivery Optimization (DO). You may configure the Windows Package Manager settings to use the standard `WININET` library. Add the following network setting: 133 134 >`"network": {"downloader": "wininet"}` 135 136 #### Error 0x80d03002 137 138 This error is related to Delivery Optimization (DO). You may configure the Windows Package Manager settings to use the standard `WININET` library. Add the following network setting: 139 140 >`"network": {"downloader": "wininet"}` 141 142 #### Error 0x80070490 143 144 The following error is displayed when trying to install some appxbundles. 145 146 ``` 147 Install failed: error 0x80070490: Opening the package from location appxbundle_Name.appxbundle failed. 148 0x80070490 : Element not found. 149 ``` 150 151 A possible troubleshooting step is to install the [KB5005565](https://support.microsoft.com/topic/september-14-2021-kb5005565-os-builds-19041-1237-19042-1237-and-19043-1237-292cf8ed-f97b-4cd8-9883-32b71e3e6b44) update, reboot your machine and try installing the appxbundle again. 152 153 #### Updating Microsoft.DesktopAppInstaller from version 1.0.42251.0 doesn't render package name on Windows 11 Pro image in Azure 154 155 Launching the Microsoft.DesktopAppInstaller update on Windows 11 Pro image in Azure to update from version 1.0.42251.0 might not render the correct package name title. The workaround to this issue is to install the latest Microsoft.DesktopAppInstaller with Windows Package Manager. 156 157 #### Failed in attempting to update the source: winget 158 159 The WinGet Community repository (a.k.a. "winget" source) requires network connectivity to https://cdn.winget.microsoft.com/cache. Depending on the version of WinGet, either the source.msix or source2.msix is downloaded and installed. This pre-indexed package contains the local copy of metadata queried by WinGet. 160 161 If running `winget source update` doesn't resolve the problem and you are on WinGet 1.10 or newer, you may be able to correct the problem by uninstalling the current source "Windows Package Manager Source (winget) V2" and running another winget command, or manually install the source from: https://cdn.winget.microsoft.com/cache/source2.msix (You may need to download this using "In Private" if you encounter a 404).