Windows Installer Editor Reference
58
Setting Up
See also:
About Component Rules
on page 58
Selecting a Component Rule Set
on page 58
Using Component Rules to Align GUIDs in an Upgrade
on page 59
About Component Rules
A component rule set manages components that are added to installations.
z
A rule set is a collection of rules.
z
A rule consists of one or more conditions and one or more actions.
z
A condition determines the criteria that a resource must meet in order for an action
to be performed. Example: If you select the condition Added resource is a Shortcut,
the action is only performed for shortcut resources.
z
An action determines how a resource will be assigned to a component.
Rule sets are stored in the registry.
How Component Rules Are Applied
Component rules are applied in the order they appear from top to bottom in the list of
rules on the Customize Component Rules dialog box. When a rule has multiple
conditions, only resources that meet all the conditions have the rule applied to them.
Once an added resource matches the conditions in a rule, the action is applied and no
subsequent rules are evaluated for that resource. If you add a resource that does not
meet any of the conditions in the rule set, then the Microsoft Best Practices rule set is
used for that resource.
See also:
Component Rules
on page 57
Microsoft Best Practices Component Rule Set
on page 63
Selecting a Component Rule Set
Use the Component Rule Selection dialog box to select a rule set and component naming
conventions for the current installation or to set the default rule options for all future
installations.
The component key values you enter on the Component Rule Selection dialog box can
be overridden by specific rules. Example: If you use a rule set that contains rules for
naming certain types of components, then only the components that do not meet the
conditions in the rule set will be named using the component key value options you
specify here.
To select a component rule set
1. Select Component Rules menu > Select Rule Set.
In Visual Studio: Project menu > Component Rules > Select Rule Set.
The Component Rule Selection dialog box appears.
2. From Rule Set Name, select the rule set to use for this installation.
3. To make the specified rule set the default for all future installations, mark Make
this the default rule set for all Windows Installer files.