The following procedure describes the general steps to authoring merge modules.
To create a new merge module
- Obtain a software tool you can use to edit the merge module database.
- Obtain a blank merge module database.
- 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.
- 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.
- 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.
- 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.
- 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.
- Add a record to the File table for every file stored in MergeModule.CABinet.
- Add the information necessary to identify the merge module in the ModuleSignature table. Every merge module requires a ModuleSignature table.
- List the components in the merge module in the ModuleComponents table. Every merge module requires a ModuleComponents table.
- 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.
- Add a _Validation table to the merge module. A merge module requires a _Validation table to pass validation.
- 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.
- 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.
- Add the summary information to the Merge Module Summary Information Stream.
- Run validation on all merge modules before attempting to install.
See Also
- 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
Send comments about this topic to Microsoft
Build date: 8/13/2009
© 2009 Microsoft Corporation. All rights reserved.