This can be done by handling the CancelButtonClick
event and setting the Confirm
parameter...
var
ForceClose: Boolean;
procedure Exterminate;
begin
ForceClose:= True;
WizardForm.Close;
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm:= not ForceClose;
end;
function NextButtonClick(CurPageID: Integer): Boolean;
var
ResultCode: Integer;
X: Integer;
begin
Log('NextButtonClick(' + IntToStr(CurPageID) + ') called');
Result := True;
case CurPageID of
wpWelcome: begin
if CheckForNewInstaller then begin
Exterminate;
end;
end;
....
end;
end;