User Guide
63
Component Rules
Component Rules
You can select or create rules that help you manage the creation of components in an
installation. Using component rules eliminates the need to specify component
information for every individual resource you add to an installation and ensures that
components are created consistently across all installations. Component rules can also
help you align component GUIDs in an upgrade with component GUIDs in previous
versions of the installation.
When you first create an installation, you select a component rule set to manage
components you add to that installation. Then, whenever you add a resource, such as a
file, registry key, shortcut, or anything else that can be installed, components are
created for those resources in accordance with the rule set you selected. Example: You
can always create a new component for each new file added to the installation, or you
can group related resources, such as help files, into one component.
Two predefined rule sets are provided. You might find that they manage your
components satisfactorily and no customization is necessary. If the predefined rule sets
do not meed your needs, you can duplicate them and modify the copies as needed, or
you can create new rule sets to reflect your company’s standards. For descriptions of the
predefined rule sets, see Microsoft Best Practices Component Rule Set on page 68 and
One File Per Component Rule Set on page 69. For instructions on creating new rule sets,
see Customizing Component Rules on page 66.
(Enterprise Edition only.) You can share component rules with others in your
organization via a share point directory. Sharing component rules ensures that you
always use the most current set of rules and that your installations always adhere to
company standards for creating components. To share component rules, select Tools
menu > Options, click the Repository tab, and click the Advanced button. (In Visual
Studio: Tools menu > Options > Wise Options > Repository.) Make sure a shared
directory is specified for the Component Rules path. See Setting Repository Options on
page 54.
About Component Rules
A component rule set manages components that are added to installations.
! A rule set is a collection of rules.
! A rule consists of one or more conditions and one or more actions.
! 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.
! An action determines how a resource will be assigned to a component.
In the Standard and Professional Editions, rule sets are stored in the registry. In the
Enterprise Edition, rule sets are stored in an .INI file located in the share point directory.
You can change the location; see Setting Repository Options on page 54. Do not attempt
to edit the .INI file outside of the Component Rules dialogs.
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.