microsoft / microsoft/winget-cli

VCRedist 2010 full version number not detected by Winget

Open
#2,888 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Brief description of your issue

Latest VCRedist 2010 x64 in winget-pkgs is 10.0.40219.

Problem is that there have been several releases 10.0.40219.x, but Winget does not seem to detect the 4th version number position. Newest right now: 10.0.40219.473.

Output from winget list vcredist
C:\Users\olavb>winget list vcredist
Name                                                               Id                           Version       Source
---------------------------------------------------------------------------------------------------------------------
Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.40664       Microsoft.VCRedist.2013.x86  12.0.40664.0  winget
Microsoft Visual C++ 2015-2022 Redistributable (x86) - 14.34.31931 Microsoft.VCRedist.2015+.x86 14.34.31931.0 winget
Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.34.31931 Microsoft.VCRedist.2015+.x64 14.34.31931.0 winget
Microsoft Visual C++ 2010  x64 Redistributable - 10.0.40219        Microsoft.VCRedist.2010.x86  10.0.40219    winget

C:\Users\olavb>

Adding a newer version to winget-pkgs probably would likely not offer users with previous versions installed an upgrade.

This behavior from Winget is probably expected, because the uninstall info written by the installer to the registry does not include the full version number (DisplayVersion).

Screenshot from registry

image

A workaround to get full version info is:

Get-ItemPropertyValue -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x64' -Name 'Version'

Anyways, is there anything winget-cli can do, or should do, to be able to catch edge cases like this? Add ability for custom detection methods maybe?

Steps to reproduce

Install: winget install --id Microsoft.VCRedist.2010.x64 --silent
List: winget list Microsoft.VCRedist.2010.x64

Expected behavior

Full version number is displayed.

Actual behavior

4th digit/position of the version number is missing, thus can't validate whether newer versions are available.

Environment
Windows Package Manager v1.4.10173
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.2486
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.10173.0

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

Reproduce the behavior with winget install --id Microsoft.VCRedist.2010.x64 --silent and winget list Microsoft.VCRedist.2010.x64. Compare the registry DisplayVersion with the Version value at the provided VCRedist path, then trace Winget's installed-version detection. Done means the full four-part version is displayed and newer package versions can be recognized.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.