microsoft / microsoft/winget-cli
Silent uninstallation not working for packages with AppsAndFeaturesEntries
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
WinGet will not run its uninstaller silently if AppsAndFeaturesEntries is present in the installer manifest of the package. Explicitly passing --silent to WinGet or specifying InstallerType in AppsAndFeaturesEntries does not help.
This also affects upgrading these packages if UpgradeBehavior set to uninstallPrevious, such as the JetBrains ones: https://github.com/microsoft/winget-pkgs/issues/92373
Steps to reproduce
- Manually download and install an old version of PyCharm Community from https://download.jetbrains.com.cn/python/pycharm-community-2023.2.5.exe
- Run
winget upgrade JetBrains.PyCharm.Community - WinGet runs the uninstaller before installing the latest version of this package.
Expected behavior
The uninstaller window should not pop up for this package (as the uninstaller is NSIS-based which doesn't have SilentWithProgress mode) and the uninstallation should be done silently and automatically.
Actual behavior
The uninstaller window popped up and was waiting for user's interaction, which means the uninstaller didn't run in silent mode.
In fact WinGet didn't pass any switches (including /S) when executing the uninstaller.
Environment
Windows Package Manager (Preview) v1.7.3481-preview
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22631.3007
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.3481.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the upgrade with the PyCharm package and review the uninstaller path used when AppsAndFeaturesEntries is present, including the --silent and InstallerType handling. Done means an NSIS-based uninstaller receives the appropriate silent invocation and an UpgradeBehavior of uninstallPrevious completes without prompting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100