如何确定是否已安装MSVC ++ 2015可再发行组件(32位或64位)? [英] How to determine whether MSVC++ 2015 redistributable (32- or 64-bit) is already installed?

查看:327
本文介绍了如何确定是否已安装MSVC ++ 2015可再发行组件(32位或64位)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我正在准备一个使用C ++构建的应用程序的安装程序,并要求
Microsoft Visual C ++ 2015可再发行组件。找到了几个论坛帖子( thread
#1

thread#2
)指向潜在的解决方案,但调查进一步发现,它们不是可再分发的不同颠覆的持久解决方案,而且无法确定已安装运行时的位数。通过说
可再分发的不同颠覆,我的意思是它是初始版本,更新版本2015,可再发行版本的第2版,第2版或第3版。是否有任何持久的方法来检查是否安装了C ++运行时的给定版本和位数?我准备的
安装程序按需下载所需的第三方组件,因此跳过下载运行时并运行它的过程将节省时间。众所周知,如果已经安装了运行时并且试图在安静模式下再次安装
,那么它将无所事事,因为它会检测它是否已经安装。因此,如果我们尝试再次安装运行时,安装将不会中止,但它是我正在进行的集成检测。

I am preparing an installer for an application which is build with C++ and requires that the Microsoft Visual C++ 2015 redistributable is installed. Found several forum threads (thread #1, thread #2) that point to potential solutions but investigating further figured out that they are not persistent solutions across different subversions of the redistributable and moreover one cannot determine the bitness of the installed runtime. By saying different subversions of the redistributable I mean whether it is the initial version, update 1, 2 or 3 of the version 2015 redistributable. Is there any persistent way to check whether a given version and bitness of the C++ runtime is installed? The installer that I am preparing downloads the needed third-party components on demand and thus skipping the process of downloading the runtime and running it would save time. It is perfectly known that if the runtime is already installed and one tries to install it again in quiet mode it would just do nothing since it would detect if it is already installed or not. So, the installation won't be aborted if we try to install the runtime again but it is its integrated detection that I am aksing for.

"追求完美......"

"The pursuit of perfection ..."

推荐答案

你好Ivan Caravanio,

Hi Ivan Caravanio,

感谢您在此处发帖。

>> 如何确定MSVC ++ 2015是否可再发行(32位或64位)已安装?                                   

>>How to determine whether MSVC++ 2015 redistributable (32- or 64-bit) is already installed?                                 

如果要获取MSVC ++ 2015可再发行组件的版本,可以枚举此注册表的版本值。

If you want to get the version of the MSVC++ 2015 redistributable, you could enumerate the version value of this registry.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0\VC\Runtimes\x86 or x64

此注册表也可以帮助您找到有关每个版本的MSVC ++ 2015可再发行组件的信息。

And also this registry could help you find the information about each version of MSVC++ 2015 redistributable.

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Dependencies\Product IDs

这是一个关于如何枚举注册表子项的文档。

Here is a document about how to enumerate Registry Subkeys.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724256(v = vs.85)的.aspx

希望这可以帮助你。

最好的问候,

Sera Yu

Best Regards,
Sera Yu


这篇关于如何确定是否已安装MSVC ++ 2015可再发行组件(32位或64位)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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