x86 and x64 installer - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

jwest
Posts: 56
Joined: Tue Dec 27, 2005 12:14 am

x86 and x64 installer

I have an Excel addin that is compiled for AnyCPU. Currently I have a separate AI Installer for x86 and x64.

We will be releasing our x64 installer when Office 2010 ships.

We are anticipating confusion from our users when it comes to Office 2010 x86 versus x64. Many will just assume that since they are running Win 7 x64 then the version of Office 2010 they installed is also x64. This will not be the case for most users as Office 2010 will install the x86 version on Win 7 x64 by default to avoid a boat load of confusion when users find out their old addins and compiled function libraries no longer work in x64.

As it stands now, our users will have to choose to download and install either the x86 version or the x64 version.

What's the best way using AI 7.6 Pro to:

1. Combine the 2 installers into a single installer. The program files are the same between x86 and x64. It's only the target location and the registry that differ.

2a. Detect if the system has a 32-bit version of Excel on it (this can be done by simply looking at a few registry keys) and launch the x86 installer.

2b. Detect if the system has a 64-bit version of Excel on it (this can also be done by simply looking at a few registry keys) and launch the x64 installer.

I believe that I can do this with a Visual Studio 2010 setup project.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: x86 and x64 installer

Hello,

I am attaching a sample installer that demonstrates the idea behind this:
- we have a main installer that launches either the 32bit or the 64bit installer. You should condition these using the Install Conditions tab from the prerequisites' edit dialog. Currently they are not conditioned so both will be launched. The two installers are set as global prerequisites for the main installer.
- on the Product Details page, "Register product with Windows Installer" is unchecked. The main installer is just a wrapper, so we do not want it to display on the Add/Remove programs page.
- the other two installers are just 32bit and 64bit packages that are launched by our wrapper.

Note that the main installer's user interface is not displayed because it is launched with the /qn option which means "no user interface". This is configured from the Media page->Bootstrapper tab->Msi Command Line field. Also, the "Include install files in EXE" option is enabled so that only one .exe installer is generated that includes both 32bit and 64bit installers.

Let me know how this worked for you.

Best regards,
Gabriel
Attachments
sample.zip
(1.41 MiB) Downloaded 1259 times
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
jwest
Posts: 56
Joined: Tue Dec 27, 2005 12:14 am

Re: x86 and x64 installer

Thanks!

I will be working on this over the next couple of days. Our software is distributed over the web. Does this solution result in a single msi file that our users can download?

Will you be shipping an update to AI that contains Office (Excel) 2010 (x86 and x64) prerequisites soon?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: x86 and x64 installer

Hello,

Because of using the prerequisite, the installer will be an .exe, not an .msi. But yes, it will be a single file.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
jwest
Posts: 56
Joined: Tue Dec 27, 2005 12:14 am

Re: x86 and x64 installer

Thanks. I noticed that you explained that in your original post. Sorry. I have looked at the sample you provided. It's a nice, clean solution.

One thing I noticed is that because we would be including 2 separate msi files in the main downloadable installer package, its size would likely be twice that of a single msi. The actual files that get installed are the same for both the 32 and 64 bit versions. It's just their target locations (Program Files (x86) vs Program Files) and registry locations (wow6432node) that will vary.

Does the enterprise edition provide any alternatives that would be more useful in this situation?

This isn't all that important for now and I'm willing to let the user choose from up to 3 separate packages to download (x86, x64, x86+64) if necessary but it does mean more work for me going forward since I would have to deliver 3 tested packages instead of one every time we updated.

I'm sure most of those reading this would agree that one of the most complicated aspects of Windows development can be deployment with Windows Installer. I've watched AI evolve over the past 6 years or so and I've always been in awe of how elegantly you deal with the complexities of Windows Installer. More importantly, you've always been at least one step ahead of my installer requirements!

Two thumbs up. :)
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: x86 and x64 installer

Hi,
Does the enterprise edition provide any alternatives that would be more useful in this situation?
Yes, the Enterprise version can offer you the possibility to create a mixed installation package. This package will automatically detect the
OS type (i.e. 32 or 64 bits) and install the files and registry entries accordingly.

The type of the package can be selected from the Install Parameters page, please use the wizard to create project.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jwest
Posts: 56
Joined: Tue Dec 27, 2005 12:14 am

Re: x86 and x64 installer

In order for me to determine which msi to launch (x86 or x64) I need to examine the 64 bit HKLM/Software. Since the main msi is running as a 32 bit process, the standard registry searches can't see the 64 bit stuff. Is there a way around this?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: x86 and x64 installer

Hello,

Simply mark the prerequisite as 64-bit from the prerequisite's edit dialog in the wrapper's .aip project file. It seems I have forgotten to do so in my sample. Doing so enables the search to use the 64bit portion of the registry.

Let me know if it helped.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”