WIX check if VS2015 C++ redistributable is installed

江枫思渺然 提交于 2019-12-11 04:31:24

问题


Does anybody know how to check in a WIX project, if the actuall C++ redistributable package is installed or not? This link describes the serveral product IDs, but there is a problem with them. They change with every update of a C++ redist package. Based on that I've to apapt my checks in the WIX project every time a new VC redist package update is released, which is not a useable solution.

I want to use the RegistrySearch WIX element to solve this problem. Therefore I need to know a registry key that doesn't change if a newer version of a C++ redist package is installed. I've also checked the registry key described in this link, but no one seems to be reliable.


回答1:


Visual Studio 2013/2015 will add additional registry keys:

Hive: HKEY_LOCAL_MACHINE\SOFTWARE\classes\installer\Dependencies


Name                           Property
----                           --------
Microsoft.VS.VC_RuntimeAdditio Version     : 12.0.21005
nalVSU_amd64,v12               (default)   : {929FBD26-9020-399B-9A7A-751D61F0B942}
                               DisplayName : Microsoft Visual C++ 2013 x64 Additional Runtime - 12.0.21005
Microsoft.VS.VC_RuntimeAdditio Version     : 14.0.23026
nalVSU_amd64,v14               (default)   : {BC958BD2-5DAC-3862-BB1A-C1BE0790438D}
                               DisplayName : Microsoft Visual C++ 2015 x64 Additional Runtime - 14.0.23026

They also include keys like Microsoft.VS.VC_RuntimeMinimumVSU_amd64,v12. These keys will point to the currently installed redist packages, and will be removed/added when you install a redist package.



来源:https://stackoverflow.com/questions/42764961/wix-check-if-vs2015-c-redistributable-is-installed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!