About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
When winget commands fail, Microsoft’s troubleshooting page first gives a repair sequence if WinGet does not appear to be installed correctly, then covers log files, exit-code lookup, and known issues such as scope and HTTP 403. Our own advice for a single package install error: read the existing logs and decode the exit code before you repair the client.
What the symptom means
- winget prints a failure and a numeric exit code.
- Installers may return MSI codes such as 1603, or MSIX codes winget can translate.
- Client-not-registered problems need the PowerShell repair sequence Microsoft publishes.
Default log directory:
%LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
Find the path with winget --info.
Prove the cause before changing anything
These steps only read.
1. Show client info and log path:
winget --info
Write down, in a note you keep with the change record (for example winget-fail-info.txt): WinGet version, log path, and today’s date.
2. Open the logs from the failed run in the DiagOutputDir path from step 1. Match the log timestamp to the failure. No source refresh or repeat installation is needed to read an existing log.
3. Decode the exit code from the failed run:
winget error <exit-code>
Microsoft’s example uses winget error 1603.
Fix
When the existing logs are not enough
WinGet can produce a more detailed log when an installation is repeated with verbose logging. A repeat is another install attempt, not a diagnostic read; it can change or replace an existing package. For a managed or production endpoint, reproduce the failure on a disposable test machine or obtain the package owner’s approved installation and recovery procedure first.
Fix the cause named in the log — description
The newest log in DiagOutputDir names the failure. Microsoft’s known-issues section covers unreliable user-versus-machine scope for some EXE installers and HTTP 403 when a vendor blocks the WinGet user-agent string (Microsoft documents the user-agent format). MSIX-related codes may match 0x80073CF3 or 0x80073D02.
Optional: set verbose logging in settings
Write down, in a note you keep with the change record (for example winget-settings-before.txt): the previous "logging" section from settings.json (or that it was absent), and today’s date. Open settings with winget settings.
Risk: the next edit changes WinGet’s default logging level for all commands. Verbose logs grow faster until you restore the prior settings text. Add or replace only the "logging" section; leave other settings in the file unchanged.
Add this logging section (merge into the existing JSON; do not delete unrelated settings):
"logging": {
"level": "verbose"
}
To undo it: put the "logging" section back to the exact text in winget-settings-before.txt, or remove the section again if the note says it was absent.
Repair the WinGet client when the tool itself is broken
Microsoft’s sequence when WinGet does not appear to be installed correctly (first item on the troubleshooting page):
Write down, in a note you keep with the change record (for example winget-repair-before.txt): output of winget --info (or that the command was not found), and today’s date.
Risk: the next commands install NuGet provider pieces, the Microsoft.WinGet.Client module, and run Repair-WinGetPackageManager. That changes how the package manager is registered for this user.
Install-PackageProvider -Name NuGet -Force | Out-Null
Then:
Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null
Then:
Repair-WinGetPackageManager -Force -Latest
To undo it: reinstall the previous App Installer / WinGet build your organisation standardised on (version recorded in winget-repair-before.txt) from your software library.
Confirm the fix
winget installfor the package succeeds.winget erroris unused because no failure code remains.- Logging level is restored if you only needed verbose temporarily.
What to watch afterwards
- WinGet is not supported in the SYSTEM context as a CLI (Microsoft); use Microsoft.WinGet.Client for machine-wide scenarios.
- User versus machine scope is unreliable for some EXE installers.
Read next
Related articles you may want next.
- TroubleshootingMicrosoft Store / MSIX error 0x80073CF3: package validation or downgradeError 0x80073CF3: package failed update, dependency or conflict validation, or newer version already installed. Check Appx logs, then uninstall or fix dependencies.Read article
- TroubleshootingMSIX error 0x80073D02: packages in useMSIX update or uninstall fails with 0x80073D02 ERROR_PACKAGES_IN_USE. Close the app processes, confirm with Get-Process, then retry the install.Read article
- TroubleshootingWindows Update error 0x80240439 (WU_E_NOT_INITIALIZED): the update agent starts but cannot finish starting upWindows Update 0x80240439: the update agent cannot finish starting. Check the service and policies, then reset the agent folders, with a back-out.Read article
Risks and limits
These steps have not been lab-tested.
Exit-code tables live in the Windows Package Manager Client repository; winget error covers known WinGet, MSIX, and MSI codes, not every EXE-specific code.
Sources
- Debugging and troubleshooting issues with WinGet — Microsoft Learn, accessed 4 December 2026
This article was originally published on .