开发者

Modify existinig WIX 2 script to add 64-bit components

I have an installer script written in Wix 2 several years ago. Now I need to add two 64-bit components. One 64-bit DLL to be copied to system32 folder and another b4-bit EXE to ProgramFiles.

The installer needs to create registry key. Currently it uses a element to write a key, and a custom action (in 32-bit MSI dll) to write the serial number.

The key must be ac开发者_开发问答cessible to 64-bit EXE.

Is it possible to do in one MSI? Also how to create a condition that only copies the 64-bit files when the system is 64-bit?


msi doesn't allow installing 32-bit and 64-bit components in the same msi. You have to create a separate msi for both architectures.


In order to install 64-bit components, the MSI needs to be marked as being 64-bit - otherwise, filesystem and registry paths will be redirected. As well as adding the 64-bit attributes, the 32-bit and 64-bit packages should appear as different products; i.e. you should create new Product and Upgrade codes.

I think there may be problems with using WiX 2 to create 64-bit MSIs, so you may need to upgrade to WiX 3.x.

Since you need two MSI files for 32-bit vs. 64-bit Windows, you can easily prevent 32-bit files being installed on a 64-bit PC by not including them in the 64-bit installer. If you need a single installer executable for both x86 and x64 you'll need to use a bootstrapper which chooses which MSI to run. I don't know if burn.exe from the WiX distribution can do this.

One way to approach the source layout is to use a single master WiX file with conditionals which select which features to build in depending on the target architecture, and then have architecture-specific modules which get linked in. You can find an example of such a solution at https://svn.bluestop.org/viewvc/repos/sctpDrv/wix/ . Note that it only supports x86 and x64 and not Itanium (aka Intel64).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜