Search code examples
wixupgrademerge-module

Wix merge module upgrade code


I'm quite new to Wix so maybe this question doesn't make any sense, but why is there no upgrade code for merge modules? I currently have a small application for which I made a regular MSI. Now I would also like to make a merge module for this application, so that it can be installed along with other applications (it will be shipped to clients as part of a bunch of related applications). I would like my merge module to detect if my application is already installed, and upgrade it if necessary, but there is no upgrade code for merge modules. Is there a way to achieve this?

What I want is a behavior like this: Suppose you could install Words, Excel, etc. all separately with their own MSI, but you could also install the whole Microsoft Office, which would include the MSMs for Words, Excel... Of course, if you isntall Excel from the MSI first and then you run the MSI for Office, then the MSM for Excel would detect that it is already installed and upgrade if necessary or do nothing if it is up to date.

Thanks all for your help


Solution

  • Upgrades are handled at the level of an entire product. Merge modules are collections of related components that are included in products. So a merge module is the wrong place to specify upgrades.

    However, for the scenario you describe, you don't need upgrades: Windows Installer will upgrade individual files when their version numbers go up. See "File Versioning Rules" in the MSI SDK for the full list of versioning rules.