microsoft / microsoft/winget-cli

Optionally override DisplayVersion

Open
#2,294 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Catalog-Health Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Description of the new feature / enhancement

Some installers do not write correct DisplayVersion to registry, like VLC (until next stable version).

It would be great if Winget could implement a way to override default behavior. This would make Winget more useful, practical and resilient.

Ideally this should be handled correctly by the developers of the program in question, but it's just not practical or realistic to think like that. Take VLC for instance, this has been a known issue for months, but they still haven't published a fixed version of the installer. Unless users write correct DisplayVersion to registry themselves, VLC gets reinstalled every time one run 'winget upgrade -all'. Better to implement an optional override, than to wait for a fix. In some cases other than VLC, the devs might not even bother to fix it.

Proposed technical implementation details

I'm thinking about two potential ways of doing this.

  1. Override the registry key DisplayVersion after successfull install, by setting the registry value to match what the manifest says.
  2. Override detection method to check something else, for instance file version of a path.
  • This would work for VLC for instance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the issue's two proposed approaches: overriding the registry DisplayVersion after installation or changing detection to use a file version. Start with the winget upgrade -all behavior described in the report and identify the relevant installer and detection entry points. Done should mean an optional, manifest-based override prevents incorrect upgrade detection for cases such as VLC.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.