Executing either a 64-bit or 32-bit MSI depending on the user's operating system
An MSI can target a 64-bit or 32-bit processor architecture, but never both. An MSI contains metadata called Template Summary that denotes which architecture it supports, and it can only support one or the other at a time. However, there is a way to give the user a single package that will install either 64-bit or 32-bit software, depending on their operating system. In this recipe, we will build such a package, combining both architectures into a single bootstrapper bundle.
Getting ready
To prepare for this recipe, follow these steps:
Create two new setup projects within the same Visual Studio solution. The first is our 32-bit installer and is called
ThirtyTwoBitInstaller
. It targetsProgramFilesFolder
in its directory structure:<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLFOLDER" Name="ThirtyTwoBitInstaller" /> ...