How to detect VC++ 2008 redistributable?

前端 未结 13 1902
借酒劲吻你
借酒劲吻你 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:37

    Update for anyone else hitting this problem:

    1) If you have Visual Studio installed, the required DLLs will be present, but the "redist package" is not, so the registry keys are missing. (i.e. this will give a false negative). However, installing the redist over the top in this situation is harmless.

    2) Every major release of the redist (Any combination of VS2005/VS2008, x86/x64/IA64, and service packs: SP1,ATL security update) has a different GUID. Take care if you are expecting to deploy your application on both x86 and x64 PCs.

    3) If you use LoadLibrary or a check for Dll files, make sure you target the correct version. If you look for "any" copy of msvcrt80.dll (etc) then you won't be able to tell if it is the version your program was linked to.

提交回复
热议问题