MessageBox Example

InstallShield 2015 » InstallScript Language Reference

Project: This information applies to the following project types:

Basic MSI
InstallScript MSI

Note: To call this function in a Basic MSI setup, you must first create a custom action for the entry-point function, execute the custom action in a sequence or as the result of a dialog’s control event, and then build the release.



* InstallShield Example Script


* Demonstrates the MessageBox function.


* This script displays three message boxes, each with a

* different message and icon.




// Include Ifx.h for built-in InstallScript function prototypes.

#include "Ifx.h"


export prototype ExFn_MessageBox(HWND);


function ExFn_MessageBox(hMSI)

    STRING szMsg;



    // Display a message box that shows the information icon.

    szMsg = "This will install Example Program.";

    MessageBox (szMsg, INFORMATION);


    // Display a message box that shows the warning icon.

    szMsg = "Installing this version will replace previous one.";

    MessageBox (szMsg, WARNING);


    // Display a message box that shows the severe icon.

    szMsg = "Cannot install this application on floppy drives.";

    MessageBox (szMsg, SEVERE);