User Guide

66
Component Rules
6. Click OK on the Previous Installation Versions dialog.
All new resources you add to the upgrade installation will be checked against and
aligned with the previous installations you specified.
Customizing Component Rules
If the predefined component rule sets do not reflect your company’s standards, you can
create a new rule set. The predefined rule sets, Microsoft Best Practices and One file per
component, are read-only and cannot be modified. However, you can copy a predefined
rule set and modify the copy.
When creating new rules, refer to Microsoft’s rules for creating components; see
Organizing Applications into Components and Changing the Component Code in the
Windows Installer SDK Help.
Caution
If you are sharing component rules, when you edit existing rule sets your changes will
overwrite rule sets used by other members of your team.
To add a new component rule set:
1. Select Component Rules menu > Customize. (In Visual Studio: Project menu >
Component Rules > Customize.)
The Component Rules Manager dialog appears, listing the predefined rule sets and
custom rule sets you have created.
2. Click New.
The Enter Rule Set Name dialog appears.
3. Enter a unique Rule Set Name to identify this rule set and click OK.
The new rule set name appears and is selected in the Component Rules Manager
dialog.
4. Click Modify.
The Customize Component Rules dialog appears.
5. In the Customize Component Rules dialog, click Add to add the first rule for this rule
set.
This starts the Component Rule Wizard, which you step through to add the
conditions and actions that comprise the rule. For details on using the Component
Rule Wizard, see Adding and Editing Component Rules on page 67.
6. When you have finished adding rules to the rule set, click OK in the Customize
Component Rules dialog and then click OK in the Component Rules Manager dialog.
The new rule set is added to the list of available rule sets. To use the new rule set for the
current installation or to make it the default for all future installations, you must select it
as described in Selecting a Component Rule Set on page 64.
To customize an existing component rule set:
1. Select Component Rules menu > Customize. (In Visual Studio: Project menu >
Component Rules > Customize.)
The Component Rules Manager dialog appears, listing the predefined rule sets and
any custom rule sets you have created.
2. Click a rule set.