I think you have found a workaround so far. Since I had the same problem and found a solution, I post it here in the hope of helping others.
I wanted to disable the CANCEL button after the user started updating the application. 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;
Another way to do it manually:
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 can use this instead of the above procedures.
fubar
source share