SetErrorTitle Example

InstallShield 2016 » InstallScript Language Reference

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 SetErrorTitle function.

*

* This script customizes the title text for the message box

* displayed after a call to EnterDisk if the next disk in set

* of setup disks is not ready in the specified drive.

*

\*--------------------------------------------------------------*/

 

// Define the message box title text for EnterDisk errors.

#define MSG_DRIVE_DOOR "Drive door is open."

#define MSG_BAD_PATH   "Path not found."

#define MSG_BAD_TAG    "Bad tag file."

#define MSG_BAD_DRIVE  "Drive not found."

 

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

#include "Ifx.h"

 

export prototype ExFn_SetErrorTitle(HWND);

 

function ExFn_SetErrorTitle(hMSI)

   STRING szText;

    NUMBER nErrorID;

begin

 

   // Set the message box title for each error that can

   // occur after a call to EnterDisk.

   SetErrorTitle (ERR_BOX_DRIVEOPEN,  MSG_DRIVE_DOOR);

   SetErrorTitle (ERR_BOX_DISKID,     MSG_BAD_DRIVE);

   SetErrorTitle (ERR_BOX_BADTAGFILE, MSG_BAD_TAG);

   SetErrorTitle (ERR_BOX_BADPATH,    MSG_BAD_PATH);

 

   // Make drive A: the default.

 

   // Prompt the user to specify a disk.

   EnterDisk ("Please enter the 'Examples' disk:", "Example.exe");

 

end;