1

How to make installer to ask a question before opening the installer?

For Example:
It will ask "Are You Over 18?" then user can select whether "Yes" or "No".
If user selects "Yes", installer will open. if user selects "No", installer will close automatically.

I would like to use MsgBox feature, if I could.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Knight
  • 25
  • 4

1 Answers1

2

Call the MsgBox from InitializeSetup event function:

[Code]
function InitializeSetup(): Boolean;
begin
  Result := (MsgBox('Are You Over 18?', mbConfirmation, MB_YESNO) = IDYES);
end;

Or as @KenWhite commented, use a custom wizard page. You can use CreateInputOptionPage function for that.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992