PDA

View Full Version : Install shared between 64-bit and 32-bit systems



lbhafen
07-30-2003, 12:38 PM
I have a Basic MSI setup that I want to release one CD that supports both 64-bit and 32-bit platforms. The setup reads the INSTALLDIR from the registry using APPSEARCH, as it is targeted as an add-on to an existing product that is installed on the system.

It correctly reads the registry and sets INSTALLDIR, because if I set the registry value to C:\temp, then this comes up on both 64-bit and 32-bit systems as the INSTALLDIR.

However if the registry value is c:\Program Files\... (which will be the standard location), then on 64-bit systems the INSTALLDIR is set to c:\Program Files (x86)\...

I know that if I change the Template Summary to Intel64, then this fixes the problem, but then I have to build and release 2 setups. Is there anyway to get around this problem? I really want to release one CD that supports both platforms.

luke_s
08-01-2003, 12:31 AM
Does your install contain any special 64 bit components?>

If not, then you should be just able to detect a 64 bit system, and set the install path seperatly for both.

lbhafen
08-01-2003, 10:32 AM
Thanks for the suggestion, but I don't think it will work, from what I have discovered.

There are no 64 bit components, just 500 MB of HTML documentation (ugh). I have found that the problem is that as long as the Template on the .msi file states "Intel;1033", then on IA64, it must be installed by a 32-bit version of msiexec.exe, because any reference to /Program Files/... is converted to /Program Files (x86)/...

If I simply modify the .msi file using msiinfo.exe, and change the template to "Intel64;1033", then it works correctly, and /Program Files/... is used. It must use the 64 bit version of msiexec.exe to install in that case.

So now I can create the .msi file, copy it, and modify the template with msiinfo.exe to create an IA64 version of the install. So I will have "install.msi" and "install_ia64.msi". What I need now is the ability to launch the proper .msi file based on platform, when the CD is autorun. I wanted to use setup.ini to do this, but can't see how to do that, or use the autorun.inf on the CD to do it, but I can't see how to do that either. I found that the autorun supports:

[autorun.alpha]

to let you specify a special executable for Alpha based processors, but I have found nothing to suggest that I can put something like:

[autorun.ntia64]

to run a special program on IA 64. At this point the only solution I can think of is to write a program that detects the platform and then chains off msiexec.exe with the proper msi file. I would be open to any other suggestions.

luke_s
08-03-2003, 05:52 PM
I dont think that there are two versions of msiexec (one for 32 and one for 64 bit system).

Have a look inside the directory table on the msi file, and for the program files on a 64 bit system, the program files directory is set to Program Files 64.

On a 64 bit machine, Windows Installer must set the program files folder to this directory.

Maybe you could just create your own program files directory, and use this for both systems?