#if. . .#else. . .#endif
InstallShield 2023 » InstallScript Language Reference
Use the #if statement to select which lines to compile. You can switch various sections of the installation on and off, making the script more flexible. The #if statement works in the same manner as the run-time if statement:
#if (A = 1)
// compile if A equals 1
. . .
#else
// compile
. . .
#endif
Keep in mind the following restrictions when using #if:
• | Note that the format of the #if statement is also identical to that of the run-time if statement; you must end the #if statement with the keyword #endif. |
• | You can test only numeric constants with an #if or #elif statement. |
• | InstallScript allows nesting of #if statements up to a maximum of 10 levels. |