How to detect VC++ 2008 redistributable?

前端 未结 13 1975
借酒劲吻你
借酒劲吻你 2020-12-01 02:00

Is there a Registry setting that I can look for to determine whether or not the Visual C++ redistributable is installed, whether standalone or as part of Visual Studio 2008?

13条回答
  •  心在旅途
    2020-12-01 02:47

    looks like there is another solution proposed by a Microsoft-Developer, using MsiQueryProductState API, alas also relying on the GUIDs.

    Update: The code went live yesterday and seems to be working fine. Here is what is beeing done: It is checked for the latest-known-to-me GUID AND the path² to-where-it-is-supposed-to-be-installed. If both fails, it is installed. This seems to work fine.

    Additionally, it is installed with the command line arguments "/qb" which means "unattended but not invisible". See this other blog post about those params.

    FWIW, GUIDs for Microsoft Visual C++ 2008 / VC90 SP1 Redistributable - x86 9.0.30729

    • 64bit 30729.17: 8220EEFE-38CD-377E-8595-13398D740ACE
    • 32bit 30729.17: 9A25302D-30C0-39D9-BD6F-21E6EC160475
    • 32bit 30729.01: 6AFCA4E1-9B78-3640-8F72-A7BF33448200

    ² The path: $WINDIR\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729*

提交回复
热议问题