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

How to detect the presence of the Visual C++ 2010 redistributable package的更多相关文章

  1. FB Flash Builder 安装错误 ERROR: DW050: - Microsoft Visual C++ 2010 Redistributable Package (x86): Install failed

    这个问题很可能是你的 Microsoft Visual C++ 2010 Redistributable Package (x86) 太新的缘故,所以无法安装成功,导致最终的失败. 在控制面板-程序和 ...

  2. 安装错误 ERROR: DW050: - Microsoft Visual C++ 2010 Redistributable Package (x86): Install failed

    这个问题很可能是你的 Microsoft Visual C++ 2010 Redistributable Package (x86) 太新的缘故,所以无法安装成功,导致最终的失败. 在控制面板-程序和 ...

  3. 各版本最新的Visual C++可再发行组件包(Redistributable Package)下载和合集

    Microsoft Visual C++ 2005 Redistributable Package (x86):Microsoft Visual C++ 2005 可再发行组件包 (x86):http ...

  4. Microsoft Visual C++ Redistributable Package下载

    温馨提示: 1.目前,很多程序软件正常运行需要VC++库的支持,因此,博主在此做了一个合集,方便大家下载: 2.有需要的朋友请根据自己需要下载,博主所提供的下载地址均是微软官网的,请放心下载: 3.如 ...

  5. [入门级] visual studio 2010 mvc4开发,用ibatis作为数据库访问媒介(一)

    [入门级] visual studio 2010 mvc4开发,用ibatis作为数据库访问媒介(一) Date  周二 06 一月 2015 By 钟谢伟 Tags mvc4 / asp.net 示 ...

  6. Microsoft Visual C++ 2010(86) Redistributable不能安装完美解决

    见http://jingyan.baidu.com/article/9c69d48f41aa6313c9024ebe.html 1. 去mircosoft下载安装包(vcredist_x64.exe) ...

  7. 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 ...

  8. 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 ...

  9. [入门级] 基于 visual studio 2010 mvc4 的图书管理系统开发初步 (二)

    [入门级] 基于 visual studio 2010 mvc4 的图书管理系统开发初步 (二) Date  周六 10 一月 2015 By 钟谢伟 Category website develop ...

随机推荐

  1. tcp连接时,BROKEN PIPE错误的原因以及解决方法

    问题: 写了一个server和一个client,UNIX套接字的,server不断接收消息并打印出来,client是一个交互程序,输入一个消息回车发送,接着又可以输入消息.出问题了:当server监听 ...

  2. This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended

    VS2005转换成VS2010时出现的问题: This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x05 ...

  3. Day03:集合、文件处理和函数基础

    上节课复习:    1.总结        可变/不可变:            可变类型:list,dict            不可变类型:int,float,str,tuple         ...

  4. MVC 登录后重定向回最初请求的 URL FormsAuthentication.RedirectFromLoginPage

    在传统的Asp.net webForm 中如果使用 Form身份验证.登录后重定向到最初请求的页面只需使用 FormsAuthentication.RedirectFromLoginPage 但在MV ...

  5. 5、html的body内标签之多行文本及下拉框

    一.多行文本 <textarea name="">默认值</textarea> 二.下拉框 1.单选 <select name="city& ...

  6. 18.Consent 实现思路介绍

    讲一下实现Consent的逻辑 interaction它会根据returnUrl 输入用户名和密码后是在登陆的Controller,登陆完之后呢,会有一个returnUrl returnurl会被带到 ...

  7. CodeForces 748C Santa Claus and Robot (思维)

    题意:给定一个机器人的行走路线,求最少的点能使得机器人可以走这样的路线. 析:每次行走,记录一个方向向量,每次只有是相反方向时,才会增加一个点,最后再加上最后一个点即可. 代码如下: #pragma ...

  8. IsPostBack深入探讨

    1IsPostBack介绍 IsPostBack是Page类有一个bool类型的属性,用来判断针对当前Form的请求是第一次还是非第一次请求.当IsPostBack=true时表示非第一次请求,我们称 ...

  9. IT兄弟连 JavaWeb教程 El基本语法

    EL(Expression Language)表达式语言是在JSP 2.0版本中引入的新特性,它用于JSP文件中的数据访问.这种表达式语言能简化JSP文件中数据访问的代码,可用来替代传统的基于&quo ...

  10. shell学习(1)

    #!/bin/bash #######read从屏幕输入######## echo "what is your name?" read PERSON echo "Hell ...