Running the correct installer for 32-bit and 64-bit applications

We have an application that, for various reasons, must be compiled both a 32-bit and a 64-bit application. The fact is that we want to distribute both installation files (msi) on the same CD. Is there a startup condition or autorun.inf entry that we can use to find out which setup.exe to run? Or do we need to write a separate little exe that is called by autorun and which defines the OS and calls the corresponding setup.exe file?

+3
source share
2 answers

There does not seem to be the 32/64-bit detection support inherent in autorun.inf files .

The convention that most applications delivering 32 and 64 bit MSI is similar to the second option you mentioned.

  • Create one 32-bit setup.exe application (so that it works on any platform). Ideally, this will be written in C / C ++ so that it is as small and fast as possible and has no dependency on other libraries / frameworks (e.g. static linked).
  • Detection if you are working on 64-bit or not (see example code for Windows API Function IsWow64Process
  • Run the appropriate MSI
+1
source

You can use a custom action to detect the OS, and then call the desired installer.

I gave an example here: Single MSI to install the correct 32 or 64-bit C # application

+1
source

All Articles