WiX project allowing side-by-side installation
Asked Answered
P

2

18

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

Polynesian answered 3/5, 2011 at 8:27 Comment(0)
M
11

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.

Misname answered 3/5, 2011 at 11:57 Comment(3)
Thanks for your answers! I will this up-to-date with my progress.Polynesian
I basiccaly did what you said: Change the upgradecode. Next to that i also had to change the guid of the programsmenudir (in the startmenu) to get the folder removed on uninstall (if i have two versions installed)Polynesian
What happens if you have installed version 2 and after that you want to install the older version. Version 1 again?Elutriate
I
0

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.

Ivy answered 13/3, 2013 at 11:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.