No 'Exit Setup' message

From ISXKB

(Difference between revisions)
Jump to: navigation, search
Current revision (10:35, 4 May 2011) (view source)
 
Line 1: Line 1:
== Introduction ==
== Introduction ==
-
When the user presses the Cancel button during a setup run, installers created with Inno Setup show a message box to ask whether he's really sure that he wants to abort.
+
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]]
[[Image:ExitSetup.gif]]

Current revision

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: