如何检测Visual Studio 2013的Visual C ++ Redistributable是否已安装?
我使用Nullsoft NSIS安装程序系统但只需要Windows注册表项
我用Google搜索,并查看其他StackOverflow问题。特别是,这个Detect if Visual C++ Redistributable for Visual Studio 2012 is installed提供了要检查的确切注册表项,但是对于VS 2012的情况。
答案 0 :(得分:3)
我的NSIS系统解决方案:
ReadRegDword $R1 HKLM "SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\VC\Runtimes\x64" "Installed"
ReadRegDword $R2 HKLM "SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\VC\Runtimes\x86" "Installed"
${If} $R1 != "1"
${AndIf} $R2 != "1"
!insertmacro Log "Error: VisualStudio DLLs to the standard package (C++) 2013 is required!!"
!insertmacro Log "Setup was not completed successfully."
SetDetailsView show
Abort
${Else}
!insertmacro Log "VisualStudio DLLs to the standard package (C++) 2013 is installed."
${EndIf}