question

RichardArnold-1221 avatar image
0 Votes"
RichardArnold-1221 asked LoongKongYip-1017 published

VC++ 2015-2019 install check

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++
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RichardArnold-1221

According to the issue, it is related to <InstallChecks> element (bootstrapper), I suggest you could post the issue to DC for better help.


0 Votes 0 ·
abbodi86-0005 avatar image
1 Vote"
abbodi86-0005 answered abbodi86-0005 commented

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"


· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ abbodi86-0005 This is what I was looking for. I appreciate the multiple listing of areas to check. Since the end-user will not have Visual Studio installed, is the DevDiv a better key to check than the Wow6432Node? If not, what would you suggest?

0 Votes 0 ·
abbodi86-0005 avatar image abbodi86-0005 RichardArnold-1221 ·

Sorry for delay
all these registry keys/valus are created by VC++ 2019 redist itself, not Visual Studio

0 Votes 0 ·

@abbodi86-0005 The reason I'm checking for the VC++ version, is because I'm installing a C# application on the end-users system. They will not have Visual Studio installed, so of all the various keys you reference above, is one more appropriate to check than another? I ask this because several of the keys have VisualStudio in their path and even the DevDiv key seems it might be associated with an install of visual studio. But again, my end-user will not have visual studio installed.


0 Votes 0 ·
LoongKongYip-1017 avatar image
0 Votes"
LoongKongYip-1017 answered LoongKongYip-1017 published

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.