Components and Tasks Parameters

There are two optional parameters that are supported by all sections whose entries are separated into parameters, except [Types], [Components] and [Tasks]. They are:

Components

A space separated list of component names, telling Setup to which components the entry belongs. If the end user selects a component from this list, the entry is processed (for example: the file is installed).

An entry without a Components parameter is always processed, unless other parameters say it shouldn't be.

Example:
[Files]
Source: "MYPROG.EXE"; DestDir: "{app}"; Components: main
Source: "MYPROG.CHM"; DestDir: "{app}"; Components: help
Source: "README.TXT"; DestDir: "{app}"
Tasks

A space separated list of task names, telling Setup to which task the entry belongs. If the end user selects a task from this list, the entry is processed (for example: the file is installed).

An entry without a Tasks parameter is always processed, unless other parameters say it shouldn't be.

Note that the Don't create a Start Menu folder checkbox on the Select Start Menu Folder wizard page doesn't affect [Icons] entries that have Tasks parameters since they have their own checkboxes.

Example:
[Icons]
Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"; Components: main; Tasks: startmenu
Name: "{group}\My Program Help"; Filename: "{app}\MyProg.chm"; Components: help; Tasks: startmenu
Name: "{commondesktop}\My Program"; Filename: "{app}\MyProg.exe"; Components: main; Tasks: desktopicon


Besides space separated lists, you may also use boolean expressions as Components and Tasks parameters. Supported operators include not, and, and or. For example:

[Components]
Name: a; Description: a
Name: b; Description: b

[Tasks]
Name: p; Description: a or b; Components: a or b
Name: q; Description: a and b; Components: a and b
Name: r; Description: not a or b; Components: not a or b
Name: s; Description: not (a or b); Components: not (a or b)
Name: t; Description: a or b - old style; Components: a b