#error
InstallShield 2022 ยป InstallScript Language Reference
Use the #error directive to abort compilation and display a user-defined error message. The message to display must be entered immediately after #error 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 error message is displayed.
#define PRODUCTID 1
#if (PRODUCTID = 1)
#define PRODUCTNAME "Lite"
#elif (PRODUCTID = 2)
#define PRODUCTNAME "Professional"
#endif
#ifndef PRODUCTNAME
#error PRODUCTID out of range.
#endif