How to detect the presence of the Visual C++ 2010 redistributable package
Question:
I have seen your previous blog posts that describe how to detect the presence of the Visual C++ 2005 redistributable package and the Visual C++ 2008 redistributable package. I am creating an installer that requires the Visual C++ 2010 runtime files. How can I detect the presence of the Visual C++ 2010 redistributable package?
Answer:
Unlike the Visual C++ 2005 and 2008 redistributable packages, there are registry keys that can be used to detect the presence of the Visual C++ 2010 redistributable package.
Visual C++ 2010 redistributable package detection registry values
- Visual C++ 2010 Redistributable Package (x86)
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86]
Installed = 1 (REG_DWORD)
- Visual C++ 2010 Redistributable Package (x64)
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x64]
Installed = 1 (REG_DWORD)
- Visual C++ 2010 Redistributable Package (ia64)
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\ia64]
Installed = 1 (REG_DWORD)
Alternatively, like in past releases of the Visual C++ redistributable package, you can use an algorithm like the one I described in my previous blog posts to detect the presence of the Visual C++ 2010 redistributable package on a system:
- Call the MsiQueryProductState API
- Pass in the product code for the package that you want to detect based on the list below
- Check the return value of this API. If it is anything other than INSTALLSTATE_DEFAULT, the package is not yet installed
Visual C++ 2010 redistributable package product codes
- Visual C++ 2010 Redistributable Package (x86) - {196BB40D-1578-3D01-B289-BEFC77A11A1E}
- Visual C++ 2010 Redistributable Package (x64) - {DA5E371C-6333-3D8A-93A4-6FD5B20BCC6E}
- Visual C++ 2010 Redistributable Package (ia64) - {C1A35166-4301-38E9-BA67-02823AD72A1B}
Visual C++ 2010 SP1 redistributable package product codes
- Visual C++ 2010 SP1 Redistributable Package (x86) - {F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}
- Visual C++ 2010 SP1 Redistributable Package (x64) - {1D8E6291-B0D5-35EC-8441-6616F567A0F7}
- Visual C++ 2010 SP1 Redistributable Package (ia64) - {88C73C1C-2DE5-3B01-AFB8-B46EF4AB41CD}
PS:if you can not find the regist following these steps,then you can try this
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\Runtimes\x86
on 64-bit systems. In code that would result in accessing registry keyHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\VC\Runtimes\x86
. Notice the absence of Wow6432Node
.
On a 32-bit system the registry is the same without Wow6432Node
:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\VC\Runtimes\x86
How to detect the presence of the Visual C++ 2010 redistributable package的更多相关文章
- FB Flash Builder 安装错误 ERROR: DW050: - Microsoft Visual C++ 2010 Redistributable Package (x86): Install failed
这个问题很可能是你的 Microsoft Visual C++ 2010 Redistributable Package (x86) 太新的缘故,所以无法安装成功,导致最终的失败. 在控制面板-程序和 ...
- 安装错误 ERROR: DW050: - Microsoft Visual C++ 2010 Redistributable Package (x86): Install failed
这个问题很可能是你的 Microsoft Visual C++ 2010 Redistributable Package (x86) 太新的缘故,所以无法安装成功,导致最终的失败. 在控制面板-程序和 ...
- 各版本最新的Visual C++可再发行组件包(Redistributable Package)下载和合集
Microsoft Visual C++ 2005 Redistributable Package (x86):Microsoft Visual C++ 2005 可再发行组件包 (x86):http ...
- Microsoft Visual C++ Redistributable Package下载
温馨提示: 1.目前,很多程序软件正常运行需要VC++库的支持,因此,博主在此做了一个合集,方便大家下载: 2.有需要的朋友请根据自己需要下载,博主所提供的下载地址均是微软官网的,请放心下载: 3.如 ...
- [入门级] visual studio 2010 mvc4开发,用ibatis作为数据库访问媒介(一)
[入门级] visual studio 2010 mvc4开发,用ibatis作为数据库访问媒介(一) Date 周二 06 一月 2015 By 钟谢伟 Tags mvc4 / asp.net 示 ...
- Microsoft Visual C++ 2010(86) Redistributable不能安装完美解决
见http://jingyan.baidu.com/article/9c69d48f41aa6313c9024ebe.html 1. 去mircosoft下载安装包(vcredist_x64.exe) ...
- Visual Studio 2010 集成 SP1 补丁 制作 Visual Studio 2010 Service Pack 1 完整版安装光盘的方法
Now that Visual Studio 2010 SP1 has been released, administrators and developers may wish to install ...
- Visual Studio 2010初学者的调试指南:Mastering Debugging in Visual Studio 2010 - A Beginner's Guide
Introduction In the software development life cycle, testing and defect fixing take more time than a ...
- [入门级] 基于 visual studio 2010 mvc4 的图书管理系统开发初步 (二)
[入门级] 基于 visual studio 2010 mvc4 的图书管理系统开发初步 (二) Date 周六 10 一月 2015 By 钟谢伟 Category website develop ...
随机推荐
- Android之styles.xml,以及自定义风格
1.styles.xml 在现在的ADT创建的Project中,会有values,values-v11和values-v14三个文件夹,每个文件夹下都有一个styles.xml. API11是Andr ...
- PHP程序中的redis一些写法
<?php /** * 以下均要先链接好redis */ sdk\libs\RedisHelper::connect("s1")->keys('*'); //这个是获取 ...
- Run-Time Check Failure #3 - The variable 'p' is being used without being initialized.
Run-Time Check Failure #3 - The variable 'p' is being used without being initialized. 运行时检查失败 变量p没有初 ...
- python zlib字符串压缩
在做网络程序时,可以对字符串进行压缩来节省带宽 项目中用到 {"compress": <压缩标记>, "result":[[设备类型.设备ID, 设 ...
- HDU 2586 How far away ? (LCA,Tarjan, spfa)
题意:给定N个节点一棵树,现在要求询问任意两点之间的简单路径的距离,其实也就是最短路径距离. 析:用LCA问题的Tarjan算法,利用并查集的优越性,产生把所有的点都储存下来,然后把所有的询问也储存下 ...
- Installing cmake 2.8.8 or higher on Ubuntu 12.04 (Precise Pangolin) (转载)
转自:http://cameo54321.blogspot.com/2014/02/installing-cmake-288-or-higher-on.html Check the version o ...
- 通过HTTP请求WEBAPI的方式
平时工作中长期需要用到通过HTTP调用API进行数据获取以及文件上传下载(C#,JAVA...都会用到).这里获取的是包括网页的所有信息.如果单纯需要某些数据内容.可以自己构造函数甄别抠除出来!一般的 ...
- iOS QQ 登录
QQSDK 看官网的文档,确实让人头疼的一件事,说是两个资源文件,就找到了一个(TencentOpenAPI.framework),Demo中也没有找到. 接下来具体实现: 导入库: 添加SDK依赖的 ...
- UTF-8和Unicode互转
1.Unicode转UTF-8 void CodeCovertTool::UNICODE_to_UTF8(const CString& unicodeString, std::string&a ...
- 初学Django框架知识
首先了解什么事HTTP协议; 1.浏览器往服务器发的 请求(request): 请求消息的格式: 请求方法 路径 HTTP/1.1\r\n k1:v1\r\n k2:v2\r\n \r\n 请求数据 ...