DialogSetInfo Example

InstallShield 2014 » InstallScript Language Reference

Edition: This information applies to the following project types:

InstallScript MSI (in event-driven InstallScript—not in InstallScript custom actions)



* InstallShield Example Script


* Demonstrates the DialogSetInfo function.


* This script calls AskText twice.  On the first call the

* AskText dialog displays the default bitmap.  Then

* DialogSetInfo is called to specify an alternate bitmap;

* that bitmap is then displayed on the second call to AskText.


* Note: Before running this script, set the defined constant

*       FULL_BMP_PATH so that it references a bitmap file

*       included in the Support Files/Billboards view.




#define FULL_BMP_PATH SUPPORTDIR ^ "MyBitmap.bmp"


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

#include "Ifx.h"


function OnBegin()

    STRING  szText, szMsg, szBmpPath;

    STRING  svReturnText;

    NUMBER  nReturn;





    // Disable the Back button in setup dialogs.

    Disable (BACKBUTTON);


    // Display the AskText dialog with its default bitmap.

    szText  = "Default Bitmap.";

    szMsg   = "The bitmap on the left is the default.";

    nReturn = AskText (szMsg, szText, svReturnText);


    // Enable the Back button.

    Enable (BACKBUTTON);


    szBmpPath = FULL_BMP_PATH;


    // Set the alternate bitmap for the AskText dialog.

    DialogSetInfo (DLG_INFO_ALTIMAGE, szBmpPath, TRUE);


    // Set the text for display in the AskText dialog.

    szText = "Alternate Bitmap.";

    szMsg  = "The bitmap on the left is a custom bitmap.  This alternate " +

             "bitmap was displayed using the DLG_INFO_ALTBITMAP option in " +



    // Display the AskText dialog with the alternate

    // bitmap.

    nReturn = AskText (szMsg, szText, svReturnText);


    // Handle Back button.

    if (nReturn = BACK) then

        // Restore the default bitmap setting.


        goto start;