views:

63

answers:

1

I am creating a Visual Studio 2010 Setup project for installing my application. My application works by having multiple executable for different system bitness, and detects if you are running on a 32-bit or 64-bit system.

I'd like to have the Visual C++ 2010 x64 Runtime installed by the installer if it is a 64-bit system. Setting this as a prerequisite, disables installation on 32-bit systems. Is there any way to set this as a prerequisite, but only on 64-bit systems, without resorting to two different installers?

+1  A: 

You need to create separate MSI files for the 64-bit version and the 32-bit version to deal with the specialities of WOW64.

It is not possible to have one single MSI install both a 64-bit and a 32-bit version:

Different Packages are Required for Different Processor Architectures

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

Of course, you may create a bootstrapper that checks the system architecture and then launches the respective MSI file. I believe dotNetInstaller offers such a mechanism as has been indicated in a related question.

0xA3
How do I do this in VS2010? Can I create two setup projects, and have the 32-bit installer include the 64-bit installer? If so, how do I make it so that it installs the 64-bit version depending on the bitness of the system?
Vegard Larsen
I think my solution to this is going to be to drop the x64-requirement during installation. When you start the program, I will prompt the user to download and install the correct package (direct link) to make the program work properly. At some later stage I might add a more streamlined approach that automatically downloads and installs it (with the permission of the user, of course).
Vegard Larsen

related questions