Search code examples
installshield

Prerequisite condition for VC++ x86 runtime


I added VC++ 64 bit runtime prerequisite to my InstallShild project. File is downloaded from Microsoft page: https://aka.ms/vs/17/release/vc_redist.x64.exe and has the following description: Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.34.31931.

When this file is executed, it creates/updates the following Registry entry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vc\Servicing\14.0\RuntimeMinimum, Version, 14.34.31931. Accordingly, I added the following Prerequisite Condition to InstallShield:

x64 Prerequisite Condition

Everything is OK for x64. Now I want to add VC++ x86 runtime to the same project. File https://aka.ms/vs/17/release/vc_redist.x86.exe, description: Microsoft Visual C++ 2015-2022 Redistributable (x86) - 14.34.31931.

When this file is executed, it creates/updates the following Registry entry: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\DevDiv\vc\Servicing\14.0\RuntimeMinimum, Version, 14.34.31931. I would like to make Prerequisite Condition by the same way, as for x64. But this doesn't work, because x64 installer actually creates two registry entries: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vc\Servicing\14.0\RuntimeMinimum and HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\DevDiv\vc\Servicing\14.0\RuntimeMinimum, filling them by the same way. So, if x64 VC++ Runtime is already installed, x86 WOW6432Node condition doesn't work.

How can I solve this problem? The project has InstallScript type, so I can override installation events, if necessary. InstallShield version is 2018.


Solution

  • Try with the following registry keys:

    For 64-bit setup,

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\X64
    Value: Version
    

    For 32-bit setup,

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x86
    Value: Version
    

    Condition type should be:

    enter image description here