[Tasks] section
This section is optional. It defines all of the user-customizable tasks Setup will perform during installation. These tasks appear as check boxes and radio buttons on the Select Additional Tasks wizard page.
By itself a task does nothing: it needs to be 'linked' to other installation entries. See Components and Tasks Parameters.
Here is an example of a [Tasks] section:
[Tasks] Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"; Components: main Name: desktopicon\common; Description: "For all users"; GroupDescription: "Additional icons:"; Components: main; Flags: exclusive Name: desktopicon\user; Description: "For the current user only"; GroupDescription: "Additional icons:"; Components: main; Flags: exclusive unchecked Name: quicklaunchicon; Description: "Create a &Quick Launch icon"; GroupDescription: "Additional icons:"; Components: main; Flags: unchecked Name: associate; Description: "&Associate files"; GroupDescription: "Other tasks:"; Flags: unchecked
The following is a list of the supported parameters:
- Name (Required)
-
The internal name of the task.
The total number of \ or / characters in the name of the task is called the level of the task. Any task with a level of 1 or more is a child task. The task listed before the child task with a level of 1 less than the child task, is the parent task. Other tasks with the same parent task as the child task are sibling tasks.
A child task can't be selected if its parent task isn't selected. A parent task can't be selected if none of its children are selected, unless a Tasks parameter directly references the parent task or the parent task includes the checkablealone flag.
If sibling tasks have the exclusive flag, only one of them can be selected.
Example:Name: "desktopicon"
- Description (Required)
-
The description of the task, which can include constants. This description is shown to the end user during installation.
Example:Description: "Create a &desktop icon"
- GroupDescription
-
The group description of a group of tasks, which can include constants. Consecutive tasks with the same group description will be grouped below a text label. The text label shows the group description.
Example:GroupDescription: "Additional icons"
- Components
-
A space separated list of components this task belongs to. If the end user selects a component from this list, this task will be shown. A task entry without a Components parameter is always shown.
Example:Components: main
- Flags
-
This parameter is a set of extra options. Multiple options may be used by separating them by spaces. The following options are supported:
- checkablealone
-
Specifies that the task can be checked when none of its children are. By default, if no Tasks parameter directly references the task, unchecking all of the task's children will cause the task to become unchecked.
- checkedonce
-
Instructs Setup that this task should be unchecked initially when Setup finds a previous version of the same application is already installed.
If the UsePreviousTasks [Setup] section directive is no, this flag is effectively disabled.
- dontinheritcheck
-
Specifies that the task should not automatically become checked when its parent is checked. Has no effect on top-level tasks, and cannot be combined with the exclusive flag.
- exclusive
-
Instructs Setup that this task is mutually exclusive with sibling tasks that also have the exclusive flag.
- restart
-
Instructs Setup to ask the user to restart the system at the end of installation if this task is selected, regardless of whether it is necessary (for example because of [Files] section entries with the restartreplace flag). Like AlwaysRestart but per task.
- unchecked
-
Instructs Setup that this task should be unchecked initially.
Example:Flags: unchecked