Microsoft Windows Installer 3.0 offers performance
optimization that is also known as flyweight patching. The purpose of flyweight
patching is to enable faster updating for applications by removing execution of
unnecessary actions. For example, flyweight patching mode is primarily designed
for updates that only update some files or some registry values. Windows
Installer 3.0 analyzes the update for specific changes to determine whether
optimization is possible. If optimization is possible, the update is applied by
using a minimal processing set.
Describe flyweight patching optimization
An update is only eligible for flyweight patching optimization if
the changes that are made by the applicable transform set in the update are
made to the following tables:
When an update meets this criteria, the following message is
logged in the log file:
update makes a modification to another table, another Component table, or
another Class table, the update is not eligible for flyweight patching
optimization. When a modification to another table occurs, the following
message is logged in the log file:
Flyweight patching optimization is disabled if
any one of the updates that is recently enabled for the installation
transaction is ineligible for flyweight patching optimization. Additionally,
Windows Installer 3.0 automatically disables flyweight patching optimization
when any one of the following conditions is true:
- An application is installed for the first time.
- The REINSTALLMODE property is set to a in the REINSTALLMODE_FILEREPLACE mode.
- The update application affects run-from-source
- One of the newly applied updates is a major upgrade. This
is an update that changes the ProductCode property.
When flyweight patching optimization is disabled, one of the
following messages is logged in the log file:
You may receive a message in the log file that states that
performance optimization is enabled. Later, you may receive a subsequent
message in the log file that states that performance optimization is
Run standard conditional actions
When you enable flyweight patching mode, only the following
minimal set of standard conditional actions run:
Additional flyweight patching optimizations are included in the
registry entry. During flyweight patching optimization, only certain registry
entries are processed. The registry entries that are processed are those
registry entries that are updated by the update. The detection is based on
actual modifications that are made to the Registry table. When registry entries
are skipped because of flyweight patching optimization mode, the following
message is logged in the log file:
Understand possible compatibility issues
Flyweight patching optimization can cause possible compatibility
issues for an update. The compatibility issues can occur if the update triggers
additional installation processing or if the update requires additional
installation processing outside the changes that are indicated in the
applicable transform set for the update. The possible compatibility issues
- The update installation triggers re-evaluation of a
If the update is detected as flyweight, the
transitive component is not correctly handled. The scenario includes a
transitive component that moves from the disabled state to the enabled state
and vice versa.
- The update installation tries to install a currently absent
feature or a currently absent component.
If the component includes
global assemblies, the update application can actually fail when flyweight
patching optimization mode is enabled.
- The update indirectly alters a registry entry by changing a
property value that is referenced in the Registry table.
if the registry value is based on the value of the MyCustomProperty property that is authored as "[MyCustomProperty]," and the update
changes the value of "[MyCustomProperty]," the registry entry is not updated.
This issue occurs because the registry entry does not appear in the
Author your update to prevent flyweight patching optimizationImportant
This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
How to back up and restore the registry in Windows
The easiest way that you can author your updates
to prevent flyweight patching optimization is to add a new custom table with a
new row in the .msp file. The presence of the new custom table with the new row
prevents flyweight patching mode. For example, add a new table that is named
"CustomDisableflyweight" in the upgrade package that is used to build the
update. Author your update so that the table only has one column. This one
column also serves as the primary key column. Now, add a new row to the table
when you want to disable flyweight patching for that
Additionally, system administrators can disable flyweight
patching optimization for all updates by setting the
subkey in the registry DWORD value to 1. This action resolves application
Follow these steps, and then quit Registry Editor:
- Click Start, click Run,
type regedit, and then click OK.
- Locate and then click the following key in the registry:
- On the Edit menu, point to
New, and then click DWORD.
- Type DisableFlyWeightPatching, and
then press ENTER.
- On the Edit menu, click
- Type 1, and then click
For more information about Windows Installer 3.0, visit the
following Microsoft Developer Network (MSDN) Web sites:
Windows Installer 3.0 is available