SlowLearner
SlowLearner

Reputation: 3294

How to Abort Inno Setup

I don't know why this is not working - it's driving me nuts...

// ----------------------------------------------------------------------------
procedure InitializeWizard();

begin
  { Custom wizard pages }
  CreateTheWizardPages;

  if ListBox.items.count < 1 then begin 
    MsgBox('No File Found:'#13#10#13#10 + 'For help visit: {#myWWW}', mbInformation, mb_Ok);
    Abort;
  end else

  { Custom controls }
  CreateAboutButtonAndURLLabel(WizardForm, WizardForm.CancelButton);

  { Custom beveled label }
  WizardForm.BeveledLabel.Caption := ' My Program ';

end;

The msgbox displays - but the installer does not seem to exit silently :-(

Upvotes: 2

Views: 1232

Answers (1)

SlowLearner
SlowLearner

Reputation: 3294

Gah - so it turns out the code above works perfectly, just have to run it with the debugger turned off.

Hope this helps someone out there. The abort statement is used to exit the installer but only works from certain fuctions / procedures.

Cheers,

Upvotes: 2

Related Questions