Microsoft Windows Installer Integration
Microsoft Windows Installer (MSI) provides the ability to load a snap-in installation into the Microsoft Directory Service and have it be downloaded automatically when the user tries to open a console file that references that snap-in.
Snap-in users can distribute a saved console file to recipients who may not have installed all the snap-ins referenced in the console file. When a user performs an action that requires a snap-in that is not locally installed, MMC's integration with MSI makes it possible for the snap-in to be downloaded automatically and installed on the user's local machine.
MMC's integration with MSI also makes it possible to add to the current console snap-ins that are not locally installed. MMC uses the Vendor column in the Add Standalone Snap-in dialog box to indicate whether a stand-alone snap-in is locally installed. If the snap-in is not locally installed, the words "Not Installed" appear in the column. The snap-in is downloaded automatically and installed when the user adds it.
Users can use the Add/Remove Snap-in dialog box to explicitly enable or disable individual extension snap-ins. When the user enables an extension snap-in that is not locally installed, a Download button is enabled in the dialog box. When the user clicks the button, the extension snap-in is downloaded and locally installed.
For a snap-in to be automatically downloaded and installed, an installation package must be created for that snap-in. An installation package contains all the information that MSI requires to install or uninstall an application or product and to run the setup user interface (if there is one). Each installation package includes an .msi file, which contains an installation database, a summary information stream, and data streams for various parts of the installation. The .msi file can also contain one or more transforms, internal source files, and external source files or cabinet files required by the installation.
Details about creating installation packages is discussed in detail in the MSI documentation, which is available on the Platform Software Development Kit (SDK). The rest of this section covers the MMC-specific details about creating MSI packages for snap-ins.
During the creation of an MSI package, the PublishComponent table must be filled. The PublishComponent table has a number of columns. One of these columns, ComponentID, is critical to creating MSI packages for snap-ins. You can use the AppData column to display additional explanatory text to the user.
Note
The value of the Qualifier column must be the GUID of the snap-in that is being distributed.
The ComponentID column specifies the string GUID that represents the category of components being grouped together. MSI installs and removes an application or product from a user's system in pieces referred to as components. Components are collections of resources that are always installed or removed from a user's system together. A resource can be a file, registry key, shortcut, or anything else that can be installed. Every component is assigned a unique component code GUID.
In the case of MMC, the value of the ComponentID column depends on the type of snap-in — stand-alone or extension — for which the MSI package is being created. The following procedure specifies what the value of this column should be.
To create an MSI package for a snap-in
- Follow the instructions given in the Windows documentation for creating MSI packages for Windows applications.
- Fill the ComponentID column of the PublishComponent table, according to the following rules.
If you are creating an MSI package for a stand-alone snap-in, the value of this column must be the following string:
"{374F2F70-060F-11D2-B9A8-0060977B1D78}"
This string represents the GUID generated by MSI for MMC.
If you are creating an MSI package for an extension snap-in, the value of this column must be the string representation of the CLSID of the snap-in that is extended. If the extension snap-in extends more than one snap-in, a different MSI package is required for each snap-in that is extended.
Enabling the "Download Missing COM Components" Policy
For snap-ins missing on a system to be installed automatically, the administrator of that system must enable the "Download missing COM components" policy. The default setting of this policy is "Not configured," meaning that automatic downloads are disabled.
Administrators can use the Group Policy snap-in to edit policies. To change the setting of the "Download missing COM components" policy, go to either the User Configuration or Computer Configuration node of the Group Policy snap-in, depending on whether the policy should be set at the User or the Computer level. The policy setting is available in the result pane of the Administrative Templates/System subnode.
Be aware that there are potential unintended side effects to enabling the "Download missing COM components" policy. For more information about Group Policy, see the Group Policy documentation on the Platform SDK.
Related topics