#warning

InstallShield 2019 ยป InstallScript Language Reference

Use the #warning directive to display a compiler warning and a user-defined error message. The message to be displayed must be entered immediately after #warning and be separated from the directive by at least one space.

In the example below, the constant PRODUCTID must equal 1 or 2. If the value of PRODUCTID is not within that range, the constant PRODUCTNAME is not defined and a user-defined warning message is displayed.

#define PRODUCTID 1

#if (PRODUCTID = 1)

    #define PRODUCTNAME "Lite"

#elif (PRODUCTID = 2)

    #define PRODUCTNAME "Professional"

#endif

#ifndef PRODUCTNAME

    #warning PRODUCTID out of range.

#endif