Most developers understand the benefits of writing reusable code. It makes sense to use that piece again when you need the same functionality. The more pre-tested software you can reuse, the fewer bugs you’re likely to have in the final product.
Merge modules extend the notion of reusable components to the software installation process. Once you’ve developed a way to install a reusable component, you can also reuse the installation process!
Merge modules are pre-compiled libraries of components like files, registry, and other system changes which install a discrete portion of the application. This common module can be added to the various applications, instead of adding individual components to different msi files. They cannot be installed alone. they must be merged or added to an msi file to install it.
Merge modules are a mechanism that allows many Application Publishers to prepackage components, sign them and share these standard modules!
A merge module is similar in structure to a simplified Windows Installer .msi file. A merge module(msm file) contains files, DLLs, ActiveX components, registry entries and some system configurations like environment variables that make up these runtimes.
The use of merge modules can eliminate many instances of version conflicts, missing Registry entries, and improperly installed files!
As mentioned before, a merge module cannot be installed alone, it must be merged into an installation package using a merge tool. Developers can also 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.
Developers can use this method to merge modules or obtain a merge tool from an independent software vendor like Wise, InstallShield etc.
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.
Merge modules is a tool for the developer, not for the end user!
Summing up, points to remember about the merge modules:
- All the information required to install a shared file is delivered to the installer in a single, standardized .msm file.
- Eliminate many instances of version clashing, missing registry entries, and improperly installed files.
- Traditional installers keep an incremental reference count of the number of applications using a shared file, but not the name of the application. If shared files are installed from .msm files, the Windows installer can keep a correct reference list of applications that use those shared files.
- Windows can better avoid deleting shared resources used by any application until the last application using them is uninstalled.
About Author: Vijay is a passionate Technology Evangelist & a Photographer at iclickd. He was also a former Microsoft MVP from India. Contact Me.