winget install/upgrade output codes not documented #3197
-
I'm using PowerShell to install apps via winget, and want to use the exit codes to understand the status, especially on failure. Not the exit codes of the applications, but winget itself. In my script I'm using: Then using $LastExitCode to get the output The exit codes are not standard, and are not documented. What I have found so far are: Getting a lot of "-1978335205", on devices at various sites in one of our customers' Intune tenants, but I can't replicate to find out what this means. What I got from ChatGPT as the expected exit codes: I just want a documented list of exit codes and what they mean so that we can understand what is going on with these failures. Any chance of getting this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You should put a 👍 on the related issue to raise its priority: While they aren't documented, they are defined in this file AppInstallerErrors.h and you can get a rough understanding of the error through its name. Your specific exit code |
Beta Was this translation helpful? Give feedback.
-
Putting this here for any future explorers:
|
Beta Was this translation helpful? Give feedback.
You should put a 👍 on the related issue to raise its priority:
While they aren't documented, they are defined in this file AppInstallerErrors.h and you can get a rough understanding of the error through its name.
Your specific exit code
-1978335205
corresponds to a hex value of0x8A15001B
(signed 2's complement). Looking at the file, it seems an issue regarding Microsoft Store client being blocked by Group policywinget-cli/src/AppInstallerSharedLib/Public/AppInstallerErrors.h
Line 42 in 84d3e87