Authoring Merge Modules

The following procedure describes the general steps to authoring merge modules.

To create a new merge module

  1. Obtain a software tool you can use to edit the merge module database.
  2. Obtain a blank merge module database.
  3. Generate a GUID for the merge module. You need to use this GUID when authoring the primary keys of database tables in the merge module.
  4. Add a record to the Component table for each component delivered by the merge. A Component table is required in every merge module. Note that merge modules operate with components and not with features. In certain cases, however, a database table entry may need to reference a feature. For details, see Referencing Features in Merge Modules.
  5. Add a Directory table to the merge module that specifies the layout of directories the merge module adds to the target database. A Directory table is required in every merge module.
  6. Import a blank FeatureComponents table into the merge module database. This empty table provides a guideline for the merge tool in cases where the .msi file does not contain its own FeatureComponents table.
  7. Collect all the files delivered by this merge module and create the MergeModule.CABinet cabinet file. Add the cabinet to the merge module as a stream inside the .msm file.
  8. Add a record to the File table for every file stored in MergeModule.CABinet.
  9. Add the information necessary to identify the merge module in the ModuleSignature table. Every merge module requires a ModuleSignature table.
  10. List the components in the merge module in the ModuleComponents table. Every merge module requires a ModuleComponents table.
  11. Add merge module sequence tables to the .msm file only if the merge module needs to modify the sequence tables of the target installation database.
  12. Add a _Validation table to the merge module. A merge module requires a _Validation table to pass validation.
  13. Merge modules require a user interface in only rare cases. Including a UI with a merge module is not recommended. In cases where a user interface is required, the UI tables can be merged into the .msi file the same as other tables.
  14. Add registry information to the appropriate registry tables in the merge module database. Add registry information for type libraries, classes, extensions, and verbs into the TypeLib, Class, AppId, ProgId, Extension, Verb, or MIME tables. All other registry information can go into the Registry table. The use of the SelfReg table is not recommended.
  15. Add the summary information to the Merge Module Summary Information Stream.
  16. Run validation on all merge modules before attempting to install.

Obtaining Blank Merge Module Databases

Obtaining Merge Module Authoring Tools

Naming Primary Keys in Merge Module Databases

Authoring Merge Module Component Tables

Authoring Merge Module Directory Tables

Authoring Merge Module FeatureComponents Tables

Generating MergeModule.CABinet Cabinet Files

Authoring Merge Module File Tables

Authoring ModuleSignature Tables

Authoring ModuleComponents Tables

Authoring Merge Module Sequence Tables

Validating Merge Modules

Authoring User Interfaces in Merge Modules

Authoring Merge Module Registry Tables

Authoring Merge Module Summary Information Streams

Merge Module Summary Information Stream Reference

Validating Merge Modules

Using 64-bit Merge Modules