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: 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
Read more: Aaron Stebner's WebLog
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: 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
Read more: Aaron Stebner's WebLog
0 comments:
Post a Comment