views:

12

answers:

1

We have an application which, for various reasons, needs to be compiled as both a 32-bit and 64-bit app. The thing is, we want to distribute both setup files (msi) on a single CD. Is there a launch condition or autorun.inf entry that we can use to know which setup.exe to launch? Or do we need to write a separate little exe that gets called by autorun, and which determines the OS, and calls the appropriate setup.exe?

A: 

There does not appear to be any 32/64bit detection support inherent in autorun.inf files.

The convention that most applications which supply a 32 and 64 bit MSI follow is similar to the second option you mention.

  1. Create a single 32bit setup.exe application (so that it will run on either platform). Ideally this will be written in C/C++ so that it is as small and quick as possible, and has no dependencies on other libraries/frameworks (eg. static linked).
  2. Detect if you are running on 64bit or not (see sample code for Windows API IsWow64Process function
  3. Execute the appropriate MSI
David Gardiner