I need to disable Next button, when input is not "Admin".
Something like:
procedure EditKeyPress(Sender: TObject; var Key: Char);
begin
{ enable the next button if the value in the box is admin; disable otherwise }
WizardForm.NextButton.Enabled:=InputPage6.values[EditIndex2].Text = 'Admin'
end;
Implement the input box
OnChange
event. You will also need to make sure the button state is updated, when the custom page is activated. You can useOnActivate
event for that (orCurPageChanged
event function).To combine multiple validations, see Inno Setup Disable Next button using multiple validation expressions (when input value matches one of multiple values).
For other approaches, see Inno Setup - Create User Input Query Page with input length and format limit and use the input.