Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable the "Next" button on the wizard form in Inno Setup?

Tags:

inno-setup

Is there a way to disable the "Next" button on the Inno Setup's wizard form ?

like image 666
Sasha Avatar asked Feb 07 '10 22:02

Sasha


2 Answers

This should work:

Wizardform.NextButton.Enabled := False;

For more information check out the InnoSetup newsgroups:
http://www.jrsoftware.org/newsgroups.php

like image 71
Zyphrax Avatar answered Nov 19 '22 05:11

Zyphrax


I guess you have found a workaround by now. Since I had the same problem and found the solution, I am posting it here in hope of helping others.

I wanted to disable the CANCEL button after a user began an application upgrade. Use this procedure:

procedure CurPageChanged(CurPageID: Integer);
begin
  // always disable the cancel button; no going back now!!!
  if UpgradeInstallationMode then
    Wizardform.CancelButton.Enabled := False;
end;

Also another way of manually doing this is:

procedure DisableCancelButton();
begin
  WizardForm.CancelButton.Enabled := False;
  WizardForm.Update;
end;

procedure EnableCancelButton();
begin
  WizardForm.CancelButton.Enabled := True;
  WizardForm.Update;
end;

Another way would be to use this [Setup] directive:

[Setup]
AllowCancelDuringInstall=yes

This is very useful for simple scenarios; you may use this instead of the above procedures.

like image 21
fubar Avatar answered Nov 19 '22 03:11

fubar