Installer: Merge Module (.msm File)

Merge Module (.msm File)

Visual Studio 6.0

Also referred to as "merge package file." A merge module (.msm file) is a single package that includes all files, resources, registry entries, and setup logic to install a shared component. Merge modules include all the information necessary for a Microsoft® Windows® installer to install a shared component.

Merge modules are consumed by installer package (.msi) files. Microsoft® Visual Studio® Installer facilitates both creating .msm files and consuming them in an .msi file. You can distribute your shared components in merge modules, and you can use shared components by including the appropriate .msm files in your .msi file.


If you’re using a batch file to install your app, you could try executing "msiexec <filename>.msm".

Or, if you want to install it programmatically, try doing a System.Diagnostics.Process.Start("filename.msm").


Installer: WiX (Windows Installer XML) Tutorial

WiX Tutorial

Introduction to the Windows Installer XML Toolset

The Windows Installer XML (WiX) is a toolset that builds Windows installation packages from XML source code.

The toolset provides both a command line environment that developers may either integrate into their oldstyle Makefile build processes or use the newer MSBuild technology from inside integrated development environments like Microsoft’s Visual Studio or SharpDevelop to build their MSI and MSM setup packages.

WiX is an open source project, originally developed by Microsoft

To summarize the features and advantages of the toolset:

  • declarative approach
  • unrestricted access to Windows Installer functionality
  • source code instead of GUI-based assembly of information
  • complete integration into application build processes
  • possible integration with application development
  • support for team development, both in-house and third-party
  • free, open source

Microsoft itself is switching to WiX with all its major software packages. Just as an example, the setup of Microsoft Office 2007 was developed entirely with WiX.


All these will be described in the source files fed to the WiX compiler. The toolset consists of several parts and we will use two of them to compile our installation packages. Assuming we have prepared a Sample.wxs file, the command

candle.exe Sample.wxs

will perform the first phase of the compilation, creating Sample.wixobj, a half-digested file (this one is still XML but its internal structure is irrelevant to us; think about it as an object file in usual compiler parlance). The second command

light.exe Sample.wixobj

will turn this intermediate representation into our final package, a Sample.msi file. Much like a compiler and a linker.

Also note that WiX is not an installation environment of its own. To put it simply, it is a comfortable, XML-style way to describe your installation requirements that gets translated into Windows Installer .msi databases by its compiler and linker. In this respect, WiX is a relatively thin wrapper around Windows Installer technology.