How to determine if the 32-bit Visual Studio 2013 redistributable is installed on a user's machine reliably via the Registry?

故事扮演 提交于 2019-12-18 21:19:38

问题


I am using DeployMaster to build an installer for a 32-bit Windows application written in C++ using Qt.

The executable depends on the Visual Studio 2013 redistributable - i.e., the 32-bit Visual Studio 2013 redistributable must be installed by the end user, prior to running this application.

I have googled, and looked at other StackOverflow questions. In particular, this link provides the exact Registry key to check, but for the case of VS 2008.

I need VS 2013, not VS 2008.

However, ideally it will be a reliable registry check - not a programmatic solution - because I can easily check a registry key with a DeployMaster installer. (If the system is determined to not have the redistributable installed, it's also easy to have the DeployMaster installer kick off the installer.)

Does anybody know a reliable method, preferably using a Registry key, that allows to make it possible to determine if the 32-bit VS 2013 redistributable is installed on an end-user's machine?


回答1:


The key you need is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DevDiv\vc\Servicing\12.0\RuntimeMinimum.




回答2:


I'm using these reg keys: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\VC\Runtimes\x86 Installed HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\VC\Runtimes\x64 Installed

I've confirmed that they appear only after the redist is installed, and they more closely match the ones for previous versions. e.g. VC++ 2010 is: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x86 Installed HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x64 Installed




回答3:


Just in case someone is looking at this, but is using NSIS to deploy their program.

You check:

ReadRegDword $0 HKLM "SOFTWARE\Wow6432Node\Microsoft\DevDiv\vc\Servicing\12.0\RuntimeMinimum" "Install"

If $0 equals 1, then it is installed. If not, it isn't.




回答4:


I found it here:

32bit
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}
or
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}

64bit
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A749D8E6-B613-3BE3-8F5F-045C84EBA29B}

This is probably better than the devdiv keys, as its the Windows key used to uninstall the msi, if its been installed. Now I just wish Microsoft's devdiv could talk to the Windows team so we can have a canonical place to detect this stuff, and a canonical name for Redistributable. Hint Microsoft, it ain't called 'minimum runtime'



来源:https://stackoverflow.com/questions/21702199/how-to-determine-if-the-32-bit-visual-studio-2013-redistributable-is-installed-o

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!