ShowMessage Method

Top  Previous  Next

Lokas Software AWinstall Online Help
Start Page
Engine Functionality
Tasks and Actions
Installer Variables
Reading from Registry and Environment
Tips And Tricks
Frequently Asked Questions
Installer Actions
Extract Files with Folders
Register COM DLL
Register COM Type Library
Create Shortcuts and Start Menu Items
Register Fonts
Add Registry Keys
Add Keys from .reg file
Add Keys from System Registry
Run External Programs
Add Uninstall Shortcut
Setup Builder Interface
Main Windows
Property Pane
Project Tree
Event Log
Menu bar commands
File
Edit
View
Project
Task
Help
Toolbars
Standard
Actions
Extending your setups
Script Actions
Installer Object
AddRegKey Method
CancelInstall Method
CopyFile Method
CreateObject Method
CreateShortcut Method
RegisterFont Method
RegisterServer Method
RegisterTypeLib Method
RunProgram Method
ShowMessage Method
Variables Method
VersionMajor Property
VersionMinor Property
General Information
Product Registration
History of Changes
  download AWinstall

Displays a message dialog.

[VBScript]

res = Installer.ShowMessage(Text, Title, Flags)

 

[JScript]

res = Installer.ShowMessage(Text, Title, Flags);

Parameters

Text

The message text.

Title

The message window title.

Flags

Numeric expression that is the sum of values specifying the number and type of buttons to display and the icon style to use. See Remarks section for values. Use numeric constants or their symbolic equivalents in VBScript.

Remarks

This method displays the message dialog, waits for the user to click a button, and returns a value indicating which button was clicked.

The return value is numeric and may be one of the following values:

Constant

Name available in VBScript

Button pressed

1

vbOK

OK

2

vbCancel

Cancel

3

vbAbort

Abort

4

vbRetry

Retry

5

vbIgnore

Ignore

6

vbYes

Yes

7

vbNo

No

The Flags parameter should contain the combination of the following values:

Constant

Name available in VBScript

Description

0

vbOKOnly

Display OK button only.

1

vbOKCancel

Display OK and Cancel buttons.

2

vbAbortRetryIgnore

Display Abort, Retry, and Ignore buttons.

3

vbYesNoCancel

Display Yes, No, and Cancel buttons.

4

vbYesNo

Display Yes and No buttons.

5

vbRetryCancel

Display Retry and Cancel buttons.

16

vbCritical

Display Critical Message icon.

32

vbQuestion

Display Warning Query icon.

48

vbExclamation

Display Warning Message icon.

64

vbInformation

Display Information Message icon.

Refer to the documentation of a MessageBox function for more details.

Installer variables are supported in the following parameters: Text and Title. To emit the value of installer variable MyVar, use the following form: ${MyVar}.

Uninstall support

This action does not support uninstallation.

Example (VBScript)

res = Installer.ShowMessage("Do you wish to visit the ${ProductName} web site?", _

  "Finishing installation", vbYesNo+vbExclamation)

If res = vbYes Then

  Installer.RunProgram "http://www.awinstall.com/moreinfo.html"""False

End If

Example (JScript)

res = Installer.ShowMessage("Do you wish to visit the ${ProductName} web site?",

  "Finishing installation", 4 + 48);

if (res == 6)

  Installer.RunProgram("http://www.awinstall.com/moreinfo.html"""false);

© 2007 Lokas Software