Page 1 of 1

Detecting VC runtimes 64-bit vs 32-bit

Posted: Thu Oct 28, 2010 1:37 pm
by JamesH
Our application requires the 32-bit VC9 runtime to be istalled. We use the 'checkvc91' script to detect if it's installed already and if not then install it.

This works on most machines. However, it seems that on 64-bit machines which have the 64-bit version of the runtime installed but NOT the 32-bit version this script returns thinking the runtime is installed already. Our application won't run as it needs the 32-bit version.

Is there a way to resolve this problem with the installation?

Thanks.

Re: Detecting VC runtimes 64-bit vs 32-bit

Posted: Thu Oct 28, 2010 7:54 pm
by mills
You may be able to modify the way the checks are made using:
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}\DisplayVersion
for x86...

Note, a check at:
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}\DisplayVersion
in 32-bit mode should work.

Use:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BBBE35B2-9349-3C48-BD3D-F574B17C7924}\DisplayVersion

for x64 version...

Re: Detecting VC runtimes 64-bit vs 32-bit

Posted: Thu Oct 28, 2010 8:32 pm
by mills
But the first question to answer is whether both versions can be installed simultaneously.

You may end up having to create two distinct versions of your software, one which can work with VCx64 runtimes. You could deploy a web installer and have it download the most appropriate version for the environment.