- Revenera Community
- :
- InstallShield
- :
- InstallShield Knowledge Base
- :
- Display a Custom Dialog Depending on the Value of a Custom MSI Property
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Display a Custom Dialog Depending on the Value of a Custom MSI Property
Display a Custom Dialog Depending on the Value of a Custom MSI Property
Description:
Need to define a custom MSI property and define a value for it. Depending on the property value the installer should conditionally display a custom dialog.
For example:
Define a property BuildType and define a value for it Beta. If the property value is Beta then the installer should display a custom dialog. If the value is something else, such as Release, then the installer should not display a dialog.
Solution:
Basic MSI Project:
Create an MSI property named BuildType with value Beta and use that MSI property in a condition to determine whether to display a dialog.
For example:
Action: Hide; Condition: Not BuildType1
Action: Show; Condition: BuildType1
InstallScript code in the same Basic MSI project:
MsiGetProperty (hMSI, "BuildType", svName, nvSize);
if(svName=="Beta") then
_WinSubShowWindow(hwnds,1);
_WinSubEnableControl(hwndDlg,TXTBOX,1);
else if (svName =="Release")then
_WinSubShowWindow(hwnds,0);
_WinSubEnableControl(hwndDlg,TXTBOX,0);
endif;