Tuesday, May 08, 2007

Merge Modules

Merge module is a special kind of Windows Installer database that contains the components needed to install a discrete software bundle. A merge module cannot be installed alone, but must be merged into a standard Windows Installer installation during compile of the installation. Typically, a merge module or a collection of merge modules related by dependencies installs a software product or portion of a product at runtime. The purpose of merge modules is to let you add self-contained software modules to multiple installations.

Example: Suppose you have 5 applications that require a specifically configured version of the Visual Basic runtime. You could create a merge module that installs and configures the Visual Basic runtime. Then you add the merge module to each installation that requires that particular Visual Basic runtime. This saves you from having to add the necessary files, registry entries, and other components to every installation individually. It also saves time if you update the merge module; instead of updating the 5 installations for all applications, you update only the merge module, then recompile the 5 installations.
When deploying software via a merge module, keep update considerations in mind. Example: If you deploy MSDE via a merge module, end users cannot use Microsoft's MSDE security patches to update that installation of MSDE. Microsoft patches only operate on software packages installed by .MSI. You would have to incorporate the MSDE patch changes in an update to your own application and distribute it to your end users. This could cause security and timing issues for your end users.
You can create merge modules and add them to installation, You can also add predefined merge modules to an installation, which install commonly-used software packages.