How can I install the x86 x86 x64 installer to install x64 on x64?

I am using the VS2008 installer (plus the Orca custom action) to create an installer for my .NET product.

I recently found out that one of the third-party builds I used is x86-specific (since it includes some native code); thus, x64 clients got crashes on startup with errors that the build was not suitable for their platform.

I sent such a customer a copy of the x64 version of this third-party assembly and asked him to simply copy it over the existing x86. It worked, sweet! So now I just need to make the installer do this for me.

This actually looks nontrivial :( Ideally, I just want the installer (which would be x86, since this can work on both platforms) to enable both the x86 and x64 versions of this third-party assembly and install the corresponding ones. In other words, I want so that one installer makes the life of my users easy.

I thought it worked using conditional statements from MSI and all that. But apparently not ... VS2008 installation projects will not compile unless you specify "x86" or "x64". If you specify x86, it will give a compilation error, stating that it cannot include the x64 assembly. If you specify x64, the result will not be executed on the x86 computer. Heck!

Someone had to have this problem before. Unfortunately, Google is useless, so I'm going to StackOverflow!

+5
source share
3 answers

If you understand correctly, you want to make a copy of one file if you are installing on x86 and another file (with the same name) if you are installing on the x64 platform.

Firstly, you cannot create one MSI for two different platforms, since x64 MSI simply will not work on the x86 platform, and the MSI x86 will be installed using WOW64 on the x64 platform.

Alternatively, you can create one MSI x86 that contains two different versions of the file and selectively copy the corresponding file during installation.

- WIX (V3) MSI VS2008. WIX , , MSBuild . (. http://wix.sourceforge.net .)

, WIX -, MSI , . ( .)

, VersionNT64, x86 x64. , x64, x86.

, .

+3

, , . , MSI , Microsoft, x86 x64- - , , , .

+6

, ( , , !).

x32 x32, x64. x32 32- , WOW.

VersionNT64, , Windows 64 .

I'm not sure how much of these features are available in VS2008 installation projects. I use some other commercial tools to configure the installer this way. Of course, you can use Orca to do this, although it was not trivial to make it work with commercial tools, and Orca is much more complicated.

+1
source

All Articles