Windows Installer Editor Reference
93
Defining an Installation Project
The core resources for an application should always be in a top-level feature. The core
feature should install a functioning version of your application; it should have no
dependencies on resources that are in optional features.
When Windows Installer repairs an installation due to corruption or deletion of a
resource, it repairs the entire feature. Example: If an advertised shortcut is part of the
top level feature, and that advertised shortcut gets deleted, the entire application is
reinstalled during the repair. Therefore, isolate advertised shortcuts and their .EXEs into
their own sub-features to avoid complete reinstallation and result in more efficient
repairs.
The following examples illustrate several strategies for organizing files into features.
Place dependent features below required core files
The features Internal_Text_Editor and Internal_Graphics_Editor, which are built into the
application, are dependent on the presence of the core application files, which are
assigned to the Core feature. Make them children of the Core feature to ensure that they
are never installed without the Core feature.
Place dependent features as siblings to core files, but require core files
The features Internal_Text_Editor and Internal_Graphics_Editor, which are built into the
application, are dependent on the presence of the core application files, which are
assigned to the Core feature. Because they are siblings of the Core feature, an end user
might install the text editor feature or the graphics editor feature without installing the
core feature, which would break the installation. To avoid this problem, make the Core
feature required; double-click it and mark the Required Feature check box on the
Feature Details dialog box. Required features cannot be turned off during installation.
The advantage to this strategy is that during installation, the end user sees the optional
features at the top level instead of buried in the tree structure.
Dependent on Core feature