Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Setup]
- AppName=MySetup
- AppVersion=1.5
- DefaultDirName={pf}\MySetup
- [Tasks]
- Name: "ImportantTask"; Description: "This task should be selected"; GroupDescription: "Important tasks";
- [Code]
- function NextButtonClick(CurPageID: Integer): Boolean;
- begin
- Result := True;
- if CurPageID = wpSelectTasks then
- begin
- if not IsTaskSelected('ImportantTask') then
- begin
- if MsgBox('You have not selected the ImportantTask option.' + #13#10 +
- 'Are you sure you want to continue ?', mbInformation, MB_YESNO) = IDNO
- then
- Result := False;
- end;
- end;
- end;
- // or yet simplified the above event method
- [Code]
- function NextButtonClick(CurPageID: Integer): Boolean;
- begin
- Result := True;
- if (CurPageID = wpSelectTasks) and not IsTaskSelected('ImportantTask') then
- begin
- Result := Msgbox('You have not selected the ImportantTask option.' + #13#10 +
- 'Are you sure you want to continue ?', mbInformation, MB_YESNO) = IDYES;
- end;
- end;
- // or yet another simplification of the above event method (without begin..end block)
- [Code]
- function NextButtonClick(CurPageID: Integer): Boolean;
- begin
- Result := True;
- if (CurPageID = wpSelectTasks) and not IsTaskSelected('ImportantTask') then
- Result := Msgbox('You have not selected the ImportantTask option.' + #13#10 +
- 'Are you sure you want to continue ?', mbInformation, MB_YESNO) = IDYES;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement