-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manifest fields for custom uninstall arguments and return codes #1885
Comments
Another one to add to the list as an example of where uninstaller exit codes are important:
It should be crystal clear to folks at Microsoft that not all uninstallers and software are created equal, and thus things like Refer to the Chocolatey project for proof of this, where the package maintainer can wrangle both install and uninstall scenarios using PowerShell. (Yes I know WinGet does not permit this, I'm just simply noting the importance of being able to handle both installer and uninstaller scenarios, and quite often install vs. uninstall vary.) |
Vencord is another one. to uninstall it you need to pass |
I don't think how the installer was executed is relevant to how the uninstaller is executed. Winget already knows that NSIS uses /S as the silent switch. If /S does not make it silent then you would have to take that up with the mIRC people, they are either overriding the silent switch in their
NSIS uninstallers by default will copy and run themselves outside the installation directory because a running executable cannot delete itself. The installer author would have to code things differently on purpose to make it work differently.
The NSIS exit codes are 0 for success, 1 for user cancel and 2 for cancelled by script action. If a installer/uninstaller returns something else then the installer author made a deliberate choice to do so. 1223 is Windows error code ERROR_CANCELLED. |
Incorrect!
|
Description of the new feature / enhancement
We currently have a bunch of manifest fields for installing packages:
But we don't have any for uninstalling packages. Many packages return funny error codes that still mean success after an uninstall, or require special arguments to make uninstall 100% silent. Currently, there isn't a way to tell winget to use these.
(I believe this will help with the Edge WebView2 issues, as it requires user interaction to uninstall and then it exits with a non-zero code, which halts the upgrade leaving the user with no WebView2).
Proposed technical implementation details
Some matching manifest keys that work similarly to the existing installer fields, per installer (I realize that it may be difficult to make a best guess at
InstallerType
if winget didn't install the package to begin with, but that will need to be implemented anyway at some point). Ideally, these switches should be ran on the local uninstall executable, presuming it still exists.If a manifest isn't available for an app that a user wants to uninstall, then the current behavior should be preserved.
The text was updated successfully, but these errors were encountered: