Specifying Whether Shared Component Patching Should Be Enabled for a Component

InstallShield 2015

Project: This information applies to the following project types:

Basic MSI
DIM
InstallScript MSI
Merge Module

InstallShield lets you specify whether you want to enable shared component patching for a component. By default, it is disabled.

If this multiple-package sharing feature were enabled in at least one package that is installed on the target system, Windows Installer 4.5 treats the component as shared among all of those packages. If a patch that shares this component is uninstalled, Windows Installer can continue to share the highest version of the component’s files on the system.

The purpose of this multiple-package component sharing is to prevent files from being downgraded during the uninstallation of a patch that contains a component that is shared with one or more other installed packages. The intent is to keep the highest version of the component’s files present on the machine after uninstallation of that patch.

Note: If the DisableSharedComponent policy is set to 1 on a target system, Windows Installer ignores this setting for all packages.

Windows Installer 4.0 and earlier ignore this setting.

The following diagram illustrates an example of two products, ABC and XYZ, that share a component that contains a file called file.dll. An end user installs product ABC first, and version 1.0.0.0 of file.dll in the shared component is installed. Next, the end user installs product XYZ, which includes version 1.1.0.0 of file.dll. Since this version is higher than the file that was installed for product ABC, Windows Installer overwrites the current version with version 1.1.0.0. Then, the end user installs an uninstallable patch for product ABC. This patch contains version 1.2.0.0 of file.dll. Since this version is higher than the one that is already present on the target system, Windows Installer overwrites the current version with version 1.2.0.0. If the end user uninstalls the patch, either of the following results may occur:

If the value of the Multiple Package Shared Component setting is Yes for either product ABC or product XYZ and if Windows Installer 4.5 is present, uninstalling the patch from product ABC could restore version 1.1.0.0 to the target system.
If the value of this setting is No for product ABC and product XYZ, the file would be downgraded to version 1.0.0.0, even though product XYZ used 1.1.0.0. As a result, if product XYZ requires version 1.1.0.0, product XYZ may no longer work properly.

If the Multiple Package Shared Component setting for the shared component is set to Yes in either package and if Windows Installer 4.5 is present, version 1.1.0.0 of the file may be restored. Otherwise, the file may be unintentionally downgraded to version 1.0.0.0.

To specify whether to enable shared component patching for a component:

1. In the View List under Organization, click Setup Design (for installation projects only) or Components.
2. Select the component that you want to configure.
3. Select the appropriate value for the Multiple Package Shared Component setting:
To enable shared component patching, select Yes. InstallShield sets the msidbComponentAttributesShared attribute of the selected component to indicate that it should be shared.
To disable shared component patching, select No. InstallShield does not set the msidbComponentAttributesShared attribute of the selected component. However, if this component is shared with another package, the msidbComponentAttributesShared attribute may be set for this component in that package. Therefore, Windows Installer 4.5 would consider the multiple-package component to be shared.