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

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:

  1. Call the MsiQueryProductState API
  2. Pass in the product code for the package that you want to detect based on the list below
  3. 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 SP1 redistributable package product codes

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

最新文章

  1. Spring中常见的bean创建异常
  2. [Bootstrap-插件使用]Jcrop+fileinput组合实现头像上传功能
  3. thinkjs中自定义sql语句
  4. SQL多表查询案例
  5. 使用TCP协议的NAT穿透技术
  6. 酷摄影:关于梦 - Miki takahashi
  7. Linux网络配置命令ifconfig输出信息解析
  8. <c>----<choose><when><otherwise>
  9. [BJOI2019] 光线
  10. 移动端控制视频点击播放点击下一个视频时自动停止播放&监听滑动溢出屏幕高度时停止播放
  11. Java设计模式之动态代理
  12. Oracle创建表空间创建用户和用户授权
  13. springboot 集成mybatis plus3
  14. Python Mysql_db对数据查询进行处理
  15. Python进行RSA安装加密
  16. RV32M指令集
  17. Codeforces Round #360 (Div. 2) D. Remainders Game 数学
  18. ORACLE ERP 的前世今生
  19. AJAX解惑篇(转)
  20. Xshell关闭导致jar服务终止,使Jar在CentOS后台运行

热门文章

  1. CSS:CSS cursor 属性
  2. nohup、&、tail 在服务启动中的用法
  3. 1、css选择器
  4. c/c++面试39-44之内存动态分配
  5. 【网络爬虫】【python】网络爬虫(四):scrapy爬虫框架(架构、win/linux安装、文件结构)
  6. 【Linux学习】Linux文件系统4—Linux文件硬链接与软连接
  7. Flutter实战视频-移动电商-08.Dio基础_伪造请求头获取数据
  8. hoj2662 Pieces Assignment
  9. 分布式集群环境下,如何实现session共享五(spring-session+redis 实现session共享)
  10. plt