reneekk
reneekk

Reputation: 233

Inno Setup How to make a task always checked?

I'm working on an Inno Setup script for my installer. My question is, how can I make a task always checked? That is, I want the task to appear, by maybe it's checked and greyed out, so the user cannot uncheck it.

Thanks.

Upvotes: 2

Views: 1118

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202310

You can disable a task programmatically only:

[Tasks]
Name: fixed; Description: "Fixed task"
Name: notfixed; Description: "Not fixed task"

[Code]

procedure CurPageChanged(CurPageID: Integer);
begin
  if CurPageID = wpSelectTasks then
  begin
    { Only now is the TasksList populated }
    WizardForm.TasksList.ItemEnabled[0] := False;
  end;
end;

Fixed task

Upvotes: 3

Related Questions