Component attributes

Reference information
Project page Components and Features
Related topics Working with attribute panes

Introduction

A Component defines a group of installation objects that must be installed or removed together. Typically, a component contains one or more files, plus any related installation objects. A component is installed if it's part of one or more Features that are selected for installation, subject to the component's Condition, Platforms, and Languages attributes (see below). In addition, the installers maintain a global reference count for each component that ensures that the component is not removed as long as at least one product uses the component.

The following table summarizes the circumstances that determine if a component is installed or removed.

Current status Parent feature(s) Condition, platforms, languages* Global refcount Action
Not installed for this product None selected ignored ignored No action
At least one selected Evaluate to FALSE ignored No action
Evaluate to TRUE none or 0 (zero) Install component; set refcount to 1
> 0 Install (update) component; increment refcount
Installed for this product None selected ignored <= 1 Remove component; delete refcount
> 1 Decrement refcount (only)
At least one selected Evaluate to FALSE <= 1 Remove component; delete refcount
> 1 Decrement refcount (only)
Evaluate to TRUE ignored No action

* Windows Installer only supports conditions, not platforms; language selection takes place at build time. Multilingual Tarma Installers evaluate all three at runtime; per-language Tarma Installers evaluate the language at build time and the other two at runtime.

MSI note MSI requires very fine-grained components, usually one component per executable file. (Non-executable files may be combined much more freely.) If you plan to build an MSI installer from your Tarma ExpertInstall project, you can make this easier by checking the Create separate component for each item box in the Bulk Import dialog when you add groups of files to your project.

Tarma note Tarma native installers have more relaxed rules for features and components. You can build a Tarma native installer without using any features or components at all; in that case, there are no product options available (although the installation folder can still be selected by the customer) and all product contents are always installed. Most of the time, however, your Tarma native installer will use some features and components, but Tarma imposes very few restrictions on the composition of your components.

Attributes

This pane contains the following attributes and options.

Attribute Description
Name

Enter the name of the component. This name is used to refer to the component in conditional expressions and symbolic expressions elsewhere in the project, but is not visible to the user. Each component must have a name that is unique within the project.

GUID

Enter the GUID (Globally Unique IDentifier) for the component. When you create a new component, Tarma ExpertInstall automatically generates a new GUID for the component. Unless you have a good reason to change this GUID and are aware of the implications, we recommend that you keep the GUID that was generated for you.

The component GUID must be unique across all Windows software; it is used, among other things, to uniquely identify your components on Windows systems. If the GUID accidentally or intentionally matches the GUID of a different component (whether yours or someone else's), the information for the two components will get mixed up.

The component GUID must have the following format:

{aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee}

Each group of characters must consist of uppercase hexadecimal digits, i.e., the characters 0-9 and A-F.

Lock GUID

Check this box to protect the GUID field against accidental changes (the field will be made read-only); clear it to allow editing of the GUID field. Because it is very important that the GUID of your components remain unchanged throughout their lifetime, we recommend that you keep this box checked.

Generate

Click this button to generate a new GUID and copy it to the GUID field. The GUID is generated by the Windows UuidCreate function and is guaranteed to be globally unique if your computer contains a functioning network card.

Note: No network access takes place when the GUID is generated, but the network card's unique identifier is used as part of the new GUID. This is combined with time and date information and a counter, and the result is then securely hashed to make it impossible to reconstruct any of the original information.

Folder alias

Enter the folder alias of the installation folder that is associated with the component, or click ... (browse) to open the Select Installation Folder dialog box that allows you to select one. The path to this folder acts as the component's path if you use the <$component_name> symbolic expression.

MSI note Windows Installer installs all files of a component in the component's folder, regardless of where you put them on the Files and Folders project page.

Key path

Displays the name of the installation object that acts as the component's key object. Windows Installer uses the key object to determine if the component is installed on the target system. To set the key path, right-click on the desired installation object on the Components and Features project page and select Set As Key Path from the context menu.

Tarma note Tarma Installer does not currently use this field.

Condition

Enter a conditional expression that determines if the component will be installed, or leave empty if the component must be installed unconditionally. Unless you check the Dynamic option (below), the condition is only evaluated once, to ensure that the component will not be accidentally installed or removed during a subsequent run of the same installation package because of changes to the condition.

MSI note Windows Installer evaluates component conditions during its CostFinalize standard action.

Tarma note Tarma Installer evaluates component conditions during its UpdateComponents standard action.

Dynamic

Check this box to re-evaluate the condition during each installer run; clear it to evaluate the condition only once. If this option is checked, the installer re-evaluates the conditon during each CostFinalize (Windows Installer) or UpdateComponents (Tarma Installer) action; with the option cleared, only the first such action evaluates the condition.

Platforms...

Click this button to open the Select Installation Platforms dialog box that allows you to select the Windows versions on which the component must be installed. This platform selection acts as an additional condition for the component.

MSI note Windows Installer does not support platform selection for components. However, when an MSI Configuration is being built, Tarma ExpertInstall will include or exclude components depending on the overlap between the component's Platforms selection and the build configuration's build platforms. A BLD:Q0062 diagnostic message will be issued if a component is excluded based on the build platforms. Beyond the build-time selection, this option option has no effect in Windows Installer.

Tarma note Tarma Installer fully supports platform selection at installation time. In addition, when a TSU Configuration is being built Tarma ExpertInstall will include or exclude components depending on the overlap between the component's Platforms selection and the build configuration's build platforms. A BLD:Q0062 diagnostic message will be issued if a component is excluded based on the build platforms.

Languages...

Click this button to open the Select Installation Languages dialog box that allows you to select the languages for which the component must be installed. This language selection acts as an additional condition for the component.

MSI note Windows Installer does not support language selection for components. However, when an MSI Configuration is being built, Tarma ExpertInstall will include or exclude components depending on the overlap between the component's Languages selection and the build configuration's build languages. A BLD:Q0063 diagnostic message will be issued if a component is excluded based on the build language. Beyond the build-time selection, this option has no effect in Windows Installer.

Tarma note Tarma Installer fully supports language selection at installation time. In addition, when a TSU Configuration is being built Tarma ExpertInstall will include or exclude components depending on the overlap between the component's Platforms selection and the build configuration's build platforms. A BLD:Q0063 diagnostic message will be issued if a component is excluded based on the build languages.

Build condition

Enter a conditional expression that determines if the component will be included in the build, or leave empty if the component must be included in all builds. The build condition is evaluated during the preflight test for each build configuration (Tarma and MSI); you can use the Build variables attribute in the TSU Configuration and MSI Configuration panes to control if the component will be included for a particular configuration.

If the condition evaluates to false, the component and all the installation objects that are controlled by it are excluded from the build process for the configuration.