15
votes

I am in the process of creating an MSI for our product. I would like the product to be able to install side-by-side. So that I can install 1.0.0 first and later can add 1.0.1 so that the two versions are both installed.

I am using WiX to create the msi and would like to know how this can and should be done in Wix? For example

  • Do I need to create new Guids for all components?
  • How would i add the version info to wix or should i rename my product completely?
  • How can I create the projects so that releasing a new version requires minimal changes in the wix project?

Greetings, Martijn

2

2 Answers

10
votes

You should be able to get away with just changing the top-level productcode and UpgradeCode GUIDs to make your two products completely unrelated, and use the Productversion to identify the version. You can share component guids between products (that's how merge modules work) so that the guts of your installer (component definitions) needn't be tweaked and can still be shared.

You major challenge will be ensuring that the two decoupled products don't interfere with one another, for example by having the same default installation folder, start menu entries and the same Add/Remove programs entry. You might achieve this by including the product version number in the ProductName Property, which can look a bit techy in your install UI, but it isn't unheard of.

0
votes

Regarding your first question: No, you don't need to.
But why?

I had difficulties to understand the windows installer rules in my side-by-side scenario. You really need to understand the concepts of component rules (including when you need to brake them) and key paths. WiX doesn't abstract these aspects away.

This answer does already highlight possible interferences. Let's consider a few examples.

  • The GUID of the component with the application executable does not need to be changed. This breaks the component rules, but it works, as both versions of the product define the same component in a non-interfering way.
  • A resource shared by both versions is not directly supported. A prominent example is the use of file extensions using ProgIDs, as shown here.

    If you change the GUID (also happening when using the "*" GUID), the extension will be removed when uninstalling either version.

    If you don't change the GUID, the extension will be retained, but point to the version which was installed most recently. You may go with this option as the lesser of two devils, supporting at least a scenario where users uninstall the versions in the same order in which they installed them.
    There is a pitfall here: The extension needs to be the key path of the component. This makes the usage of the ProgID element problematic in a side-by-side scenario as you'll get the ICE69 warning in case you don't put the ProgID element in the same component as the referenced file. Further more, it's an implementation detail of WiX which registry entry it generates will be the key path.