Jump to content

Merge Module

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Bluebot (talk | contribs) at 18:47, 17 March 2006 (bold formatting title using AWB). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A 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.

For example, suppose you have five 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 simply add the merge module to each of your installation packages that require that particular Visual Basic runtime. This saves you from having to individually add the necessary files, registry entries, and other components to every installation. It also saves time if you update the merge module; instead of updating the installations for all five applications, you update only the merge module, then recompile the five installations.

Configurable merge modules are special merge modules. They contain certain values that you can configure to specify how the module behaves in your installation. Wise for Windows Installer gives you the configuration tool that you need to access these configurable items. For example, the author of the configurable merge module may allow you to set attributes on components, enable or disable isolated components, specify a bitmap for a dialog, or specify how a custom action is run. You can add and remove configurable merge modules to and from your installation. You can also edit a configurable merge module’s source path and destination directory and set the configurable values. Configurable merge modules are supported only by Windows Installer 2.0 or higher.

You can create standard and configurable merge modules and add them to standard installations. Or you can add pre-created merge modules, which install commonly-used Microsoft software packages, such as MDAC, ActiveX controls, MFC, and DCOM.

Definition From Microsoft's Windows Installer SDK

Merge Modules Merge modules provide a standard method by which developers deliver shared Windows® Installer components and setup logic to their applications. Merge modules are used to deliver shared code, files, resources, registry entries, and setup logic to applications as a single compound file. Developers authoring new merge modules or using existing merge modules should follow the standard outlined in this section.

A merge module is similar in structure to a simplified Windows Installer .msi file. However, a merge module cannot be installed alone, it must be merged into an installation package using a merge tool. Developers wanting to use merge modules must obtain one of the freely distributed merge tools, such as Mergemod.dll, or purchase a merge tool from an independent software vendor. Developers can create new merge modules by using many of the same software tools used to create a Windows Installer installation package, such as the database table editor Orca provided with the Windows Installer SDK.

When a merge module is merged into the .msi file of an application, all the information and resources required to install the components delivered by the merge module are incorporated into the application's .msi file. The merge module is then no longer required to install these components and the merge module does not need to be accessible to a user. Because all the information needed to install the components is delivered as a single file, the use of merge modules can eliminate many instances of version conflicts, missing registry entries, and improperly installed files.

Source: msdn