VC++ 2015-2019 install check

Richard Arnold 181 Reputation points
2021-04-22T21:55:54.147+00:00

I am trying to perform a check of whether Visual C++ version 2015-2019 redistributable is installed on the clients system.
The filename is VC_redist.x64.exe, which I also have installed on my own Windows 10 OS. The product version is 14.28.29913
I am attempting to use a MsiProductCheck to check for the install.

As I also have this file installed on my system, when I check the registry for the version 14.28.29913, it returns the following registry path, which does list that file version.

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Dependencies\Microsoft.VS.VcLibrary_CRT_clickonce_enu,v14

The above key lists a DisplayName of vcpp_crt.redist.clickonce, and ProductCode of {C0A2A578-778A-4300-9DC9-185E6893816C}.

Based on the above registry values, in my product.xml file, under <InstallChecks> I ran the following check.

<InstallChecks>

<MsiProductCheck Property="VCRedistInstalled" Product="{C0A2A578-778A-4300-9DC9-185E6893816C}"/>
</InstallChecks>

Under InstallConditions, I have the following code.

<InstallConditions>

<BypassIf Property="VCRedistInstalled" Compare="ValueGreaterThanOrEqualTo" Value="5"/>
</InstallConditions>

However, this returns MsiQueryProductState = -1 and the install.log reports the following error messages.
Result of checks for command 'vcredist_x64\VC_redist.x64.exe' is 'Fail'
'vcpp_crt.redist.clickonce' RunCheck result: Fail
A prerequisite failed for Package "vcpp_crt.redist.clickonce"

It is my understanding that a value of "5" indicates the file is installed, but that a -1 indicates "The product is neither advertised or installed." However, it IS installed on my system.

Am I passing the wrong ProductCode to the MsiProductCheck? Please advise.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,720 questions
{count} votes

Accepted answer
  1. abbodi86 3,886 Reputation points
    2021-04-28T12:15:10.997+00:00

    ProductCode changes with each version, you should check for the version itself

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Dependencies\Microsoft.VS.VC_RuntimeAdditionalVSU_amd64,v14]
    "Version"="14.29.29913"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Dependencies\Microsoft.VS.VC_RuntimeMinimumVSU_amd64,v14]
    "Version"="14.29.29913"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeAdditional]
    "Version"="14.29.29913"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum]
    "Version"="14.29.29913"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\X64]
    "Version"="v14.29.29913.00"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X64]
    "Version"="v14.29.29913.00"
    
    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Loong Kong Yip 1 Reputation point
    2021-10-07T08:57:08.517+00:00

    I'm looking for VC_redist.x64.exe version 14.28.29913. Can you email me the link to download?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.