Website Building » Wix » How Do I Create a Merge Module in WiX?

How Do I Create a Merge Module in WiX?

Last updated on October 1, 2022 @ 10:12 am

Creating a merge module in WiX is a two-step process. First, you need to create a WiX source file that defines the merge module. Second, you need to compile the WiX source file into a .msm file using the light.exe tool.

To create a WiX source file that defines the merge module, you’ll need to use the <Module> element. This element has a few required attributes: Id, Language, and Version.

GREAT NEWS:

Exciting update! We've collaborated with Wix to offer WBI users with a free plan for all website creation needs - Explore the details here.

The Id attribute is used to uniquely identify the merge module. The Language attribute specifies the language of the resources included in the merge module. The Version attribute specifies the version of the merge module.

Here’s an example WiX source file that defines a merge module:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Module Id="MyMergeModule" Language="1033" Version="1.0.0">
    <!-- Add files and other elements here -->
  </Module>
</Wix>

PRO TIP: If you are not familiar with WiX or creating merge modules, it is recommended that you seek out a professional to assist you. Creating a merge module incorrectly can cause serious problems with your software installation.

Once you have created the WiX source file, you need to compile it into a .

The light.exe tool is part of the Windows Installer XML (WiX) Toolset. You can download the WiX Toolset from http://wixtoolset.org/.

To compile a WiX source file into a .msm file, use this command:

"C:\Program Files (x86)\WiX Toolset v3.11\bin\light" -ext WixMergeExtension MyMergeModule.wxs

Creating a merge module in WiX is a two-step process.

To create a WiX source file that defines the merge module, you’ll need to use the <Module> element This element has a few required attributes: Id, Language, and Version.

Here’s an example WiX source file that defines a merge module:


<Wix xmlns=”http://schemas.com/wix/2006/wi”>
<Module Id=”MyMergeModule” Language=”1033″ Version=”1.0

Drew Clemente

Drew Clemente

Devops & Sysadmin engineer. I basically build infrastructure online.