Windows Installer Editor Reference
59
Setting Up
4. In the Component Key Values section, select an option from the Default list to
determine the naming convention for new components. If the rule set you use
specifies the component naming under certain conditions, the naming convention
you specify here will be overridden when those conditions are met.
Set component key to a named Base
Select this to name new components with specified text plus an incremental
number. Selecting this option enables the Base field. Enter text to serve as a
base for the component name (example: Component). Component names will
be incremented from this base (example: Component1, Component2, and so
on).
Set component key to key of keypath or first resource
Select this to name components as follows:
If the resource is a file, registry key, or ODBC data source, give the
component the same name as the key of the keypath.
For any other type of resource, give the component the same name as the
key of the first resource in the component.
Set component key to table name of keypath or first resource
Select this to give new components the name of the table in which the keypath
or first resource resides. If multiple components are named for the same table,
an incremental number is added to the component name (example: File1, File2,
and so on).
5. From Files, you can select a different naming convention for components that are
based on file resources. You can use the long file name of the keypath file, the short
file name of the keypath file, or the naming convention specified in the Default field
above.
6. To make the options in the Component Key Values section the defaults for all
future installations, mark Make this the default key naming convention for all
installations.
7. Click OK on the Component Rule Selection dialog box.
All resources that you add to this installation from this time forward will be organized
into components according to the rule set and other conventions you specified.
See also:
Component Rules
on page 57
Using Component Rules to Align GUIDs in an Upgrade
Component rules can help you align component GUIDs in an upgrade with component
GUIDs in previous versions of the installation. If GUIDS or key paths for the same
component don’t match between the new and old .MSI, the component could
inadvertently get deleted because Windows Installer does not recognize the components
as being the same. Aligning component GUIDs for matching components prevents
upgrades from deleting necessary files in the newer version.
If you are working on an upgrade installation, you specify the previous versions of the
installation on the Previous Installation Versions dialog box. Then, make sure you use a
component rule set that contains a rule for aligning component GUIDs with previous
versions. Example: The two predefined rule sets contain a rule in which, if the keypath
resource matches a resource in the previous .MSI list, the component layout of the