Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

Conditionally displaying text control in a dialog in InstallScript MSI project

Hi all,

I am following instructions at

In one of the steps in the above link it says:


On the Behavior section of the dialog, select the control you have just added and add the following conditions (replace ISACTIONPROP1 with the property found in step 2):

  • Action: Hide; Condition: Not ISACTIONPROP1
  • Action: Show; Condition: ISACTIONPROP1



Above is for Basic MSI project dialogs where you can edit behavior from the dialog view.

I have an InstallScript MSI project and in the dialog view it says "To edit behavior for this dialog, modify the parameters for the SdWelcome function in  your script."

Can someone tell me how from the installscript, I can get this text control on the dialog and then conditionally display it.

thanks in advance.

Labels (1)
0 Kudos
(1) Reply
Flexera Alumni

Hi @agshah ,


Can you try with sample rul file given in InstallShield's INSTALLDIR for an eg:C:\Program Files (x86)\InstallShield\2019\Script\Isrt\src\ISRTScriptDialogs.rul which has SdWelcome function defined?

There you can add check for property like IS_MAJOR_UPGRADE present or not using MsiGetProperty.If that doesn't help you can add productversion based check just to check this is major upgrade of previous setup. Pseudo code would be:


#define TXTBOX 1301 //CONTROL identifier



function SdWelcome(szTitle, szMsg)

string  svName;
number nSize;
HWND hwndDlg,hwndTxtBox;



hwndTxtBox = GetDlgItem(hwndDlg,TXTBOX);

if(svName=="2.00.0000") then


You can find the same in attached sample .rul file as well.




0 Kudos