-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Winget should sanitize product version metadata in registry #4085
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
Comments
This seems like it might be related: |
Somewhat, the one you liked is about parsing the version number within the registry. This one is about sanitizing it right after the installer wrote it as well as add some safeguards and error handling using it to validate that we actually updated/installed the expected application and version (and weren't fooled by the installer silently failing) |
WinGet only writes registry entries when it acts as the installer for portable packages. There are too many expected unintended consequences if WinGet modifies the registry for things it installed vs. what the installer is doing itself. This is essentially a policy of WinGet not to modify things it doesn't have full control over. The best suggestion I currently have is to inform the ISV (Independent Software Vendor) / publisher so they can address the installer. WinGet has become a bit of a forcing function in terms of providing a consistent experience for users and publishers to identify gaps and improvements. I've been looking at the possibility of gathering information for the various installer types and providing a more comprehensive set of documents to help publishers understand what a "good" installer/uninstaller does/looks like and how to confirm the behaviors with WinGet to ensure the publisher can offer the best experience to their customers. |
Ok, assuming that policy is currently non-negotiable can we add the other parts? I.E. the sanity checks. Maybe as a two stage thing, only throw warnings in all cases for now, but schedule a switch for the suggested errors in X number of releases? Would something like that be viable? |
We're working towards doing these kind of checks in validation and surfacing them in the PR. I think that would be the first step. Currently, we only test a "clean install flow". Once we get these checks in place, I'd like to start looking at an upgrade flow and an uninstall flow. With the Windows Sandbox we might be able to expose this automation so publishers have an easier mechanism to test their packages with WinGet in various scenarios so they can easily observe what is happening. I've been discussing writing more centralized guidance for building and testing installer scenarios for all package installer types. |
Description of the new feature / enhancement
Currently we still have enough installers that fail to set their metadata properly within the registry. This causes winget to incorrectly detect the version number and suggest updating the application erroneously.
Winget should at least sanitize the most common (and easily detectable) mismatches when installing and updating a package. We cannot fix everything, but we can at least fix the generic/common ones to improve the user experience.
Proposed technical implementation details
Error cases:
The last one can be further split into:
The text was updated successfully, but these errors were encountered: