Best Practice Rules for Creating Components

Project:This information applies to the following project types:

Basic MSI
DIM
InstallScript MSI
Merge Module
MSI Database
MSM Database
Transform

When you select the Best Practices option for creating a component through the Component Wizard, the wizard automatically organizes your files into components based on Setup Best Practices. It creates components according to the following rules:

The wizard looks at every file that you add to see if it is already included in your project. If the file is a duplicate, the wizard does not create a component for it.
A new component must be created for each portable executable file (.exe, .dll, or .ocx file). The component bears the name of the portable executable file. The wizard creates a GUID for the Component Code property and sets the portable executable file as the component’s key file.
The Component Wizard attempts to extract registration information for each portable executable file. If it succeeds, the wizard creates a COM server component and writes the data to the component’s COM Server advanced setting.
Every help (.hlp) file that you specify will reside in its own component along with its associated contents (.cnt) file. The component is named after its help file. The wizard creates a GUID for the Component Code property and makes the help file the component’s key file. The same rule applies to HTML Help (.chm) files and the .chi files that accompany them.
The Component Wizard puts all font (.ttf and .ttc) files into a single component called Font Files. The wizard creates a GUID for the Component Code property and sets the first file in the list as the key file. Any .fon files that you specify will automatically be included in the AllOtherFiles component that is created. Since .fon files do not have a title, they will not be added to the Font table in the .msi package. To have these files added as fonts, you will need to use the Fonts option in the Component Wizard.
Any files that do not fall into the above categories are grouped into a single component named All Other Files. The wizard creates a GUID for the Component Code property and sets the first file in the list as the key file.