No 'Exit Setup' message

From ISXKB

Revision as of 10:35, 4 May 2011 by Markus (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Contents

Introduction

When the user presses the Cancel button during a setup run, installers created with Inno Setup show a message box asking whether they're really sure if they want to abort.

Image:ExitSetup.gif

For installers that only copy a few files or create a few registry keys or values this may look a little bit exaggerated.

Suppressing the confirmation box

A quick look into Inno Setup's event functions reveals a Pascal procedure that can be used to catch and to suppress this message: CancelButtonClick ().

[Code]

procedure CancelButtonClick (CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
  Confirm := FALSE;
end;

If the user now clicks or presses the Cancel butten the installation aborts immediately without the confirmation message box.

Example script

See also

Personal tools
Ads: