function WizardIsTaskSelected(const Tasks: String): Boolean;
Returns True if the specified task is selected. Multiple tasks may be specified in the same manner as in a Tasks parameter.
begin if WizardIsTaskSelected('desktopicon') then // the 'desktopicon' task is selected end;