如何检测是否已安装Visual C ++ 2017 Redistributable [英] How to detect if Visual C++ 2017 Redistributable is installed

查看:1539
本文介绍了如何检测是否已安装Visual C ++ 2017 Redistributable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着Microsoft在最新版本中更改注册表项的模式,我如何检测计算机上是否安装了Visual C ++ 2017 Redistributable?

With Microsoft changing the pattern of registry entries in its latest versions, how do i detect if Visual C++ 2017 Redistributable is installed on a machine?

我的目标是安装VC ++ 2015Redist,因为该软件是使用VS2015编写的.如果我可以在计算机上成功检测到VC ++ 2017Redist,则可以跳过VC ++ 2015Redist的安装

My aim is to install VC++2015Redist since the software is written using VS2015. If i can successfully detect VC++2017Redist on a machine, then I skip my installation of VC++2015Redist

推荐答案

2017 VC ++可再发行组件安装升级/替换了2015安装

安装Visual Studio 2017可再发行组件将升级并替换任何现有的2015可再发行组件的安装.我已经检查过了,2015安装从添加/删除程序"中消失了,注册表值(请参见下文)的版本号已更新.此外,

The 2017 VC++ Redistributable installation upgrades/REPLACES the 2015 installation

Installation of the Visual Studio 2017 Redistributables upgrades and replaces any existing installation of the 2015 Redistributables. I've checked this, and the 2015 installation disappears from "Add/Remove Programs", and the registry values (see below) have their version numbers updated. Further, per MSDN, the 2017 VC++ Redistributables have Binary Compatibility with the 2015 version.

可以通过检查下面描述的注册表项来检查是否安装了2015或2017.这是针对x64系统的,对于32位系统,请不要使用Wow6432Node.

It's possible to check whether 2015 or 2017 are installed by checking the registry keys described below. This is for a x64 system, have a look without the Wow6432Node for a 32-bit system.

用于64位VC ++可重新分发

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x64

用于32位VC ++可重新分发

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x86

对于32位和64位安装,属性和值相同(相同格式).注册表的使用价值:

The properties and values are the same (same format) for both 32- and 64-bit installations. Registry Values of use:

Value          2015       2017 
Name      Val. Data  Val. Data
--------  ---------  ---------
Major            14         14
Minor             0         13
Bld           23026      26020

请注意,随着新补丁的更新,2017年的@Minor和内部版本(@Bld)数量继续发生变化.

Note that the @Minor and build (@Bld) numbers of 2017 continue to change as new patches are updated.

我建议,如果检查安装的最低版本为2015,则只需检查密钥,并且@Major版本为14.

I would suggest, if checking for a minimum that 2015 is installed, just checking the key and that the @Major version is 14.

如果检查2017,并打算进行升级(如果不存在),则只需检查@Bld编号,如果它至少不是可以安装的版本,则继续安装当前的2017版本.请注意,将来可能会更新@Minor和@Bld版本-我有一台安装v14.11.25325的计算机,也是2017年版本.

If checking for 2017, with the intention of doing an upgrade if it's not in existence, then just check the @Bld number, and if it's not at least the version that can be installed, then go ahead and install the current 2017 version. Note that future updates the the @Minor and @Bld version are probable -- I've got another computer where v14.11.25325 is installed, also a 2017 version.

这篇关于如何检测是否已安装Visual C ++ 2017 Redistributable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆