Install VC ++ Runtime 64-bit if the system is 64-bit

I am creating a Visual Studio 2010 installation project to install my application. My application works by having multiple executables for a different bit system and detects if you are running on a 32-bit or 64-bit system.

I want the Visual C ++ 2010 x64 runtime to be installed by the installer if it is a 64-bit system. By setting this as a prerequisite, it disables the installation on 32-bit systems. Is there a way to install this as a prerequisite, but only on 64-bit systems, without resorting to two different installers?

+3
source share
1 answer

You need to create separate .msi files for the 64-bit version and the 32-bit version for special WOW64 tasks.

It is not possible to install a single MSI in either a 64-bit or a 32-bit version:

Different processor architectures require different packages.

Since you will have separate MSI files, it should be easy to add 64-bit VC ++ Runtime Redistributables to 64-bit MSI and 32-bit to 32-bit MSI, respectively.

Of course, you can create a bootloader that checks the system architecture and then runs the corresponding MSI file. I believe that dotNetInstaller offers the mechanism that was mentioned in the related question .

+2
source

Source: https://habr.com/ru/post/1766171/


All Articles