cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JosephM
Level 2

Use Current Value Of Property to Hide Dialog Control

Hello,
I am new to InstallShield, so this may be a newbie question. I have a Basic MSI Project where I have created a custom property, e.g. MYTEST. I have a CA which invokes a PowerShell script which sets the value of MYTEST (log confirms). I would like to use the current value of MYTEST to Hide or Show controls in the SetUpCompleteSuccess dialog. The only value that is present, is the initial value from the Property Manager. I have tried adding another CA, of Set Property after my PowerShell action - same initial value in the dialog.

Any assistance would be greatly appreciated!

Joe
Labels (1)
0 Kudos
(3) Replies
chad_petersen
Level 9

With InstallShield you can go in to "Dialogs", then select the dialog you want. Expand the plus sign and click on Behavior. Find the Control Name in the list and there is the Conditions there.

I'm not positive if 2015 shows this info in the right hand pane, but 2016 says this

Conditions
This setting lets you add one or more conditions for special actions to be applied to the selected control. For example, you can configure a condition to hide a control based on the value of a particular property.

To add one or more conditions, click the New Condition button in this setting. InstallShield adds a row under the Conditions setting. Confgure the condition in the subsetting as needed.

Available special actions are:

Default - Sets the control as the default.
Disable - Disables the control.
Enable - Enables the control.
Hide - Hides the control.
Show - Displays the control.


So you can set the special Hide action and Show action with a property using something like

Show - MYTEST=1
Hide - MYTEST=0

Then you just need to *time* the CA to do the SetProperty action prior to getting to the dialog where you want the control to be shown or hidden.

Maybe that will get you started?

Thanks,
Chad
0 Kudos
JosephM
Level 2

Chad, thanks for your comments. Well it appears to be a newbie error. The PowerShell script had an ExecuteSequence and NOT a UISequence. Therefore, the values were reset to their initial state during the dialogs. I addded an invocation in the UISequence and the properties gained their expected values.

Joe
0 Kudos
chad_petersen
Level 9

Perfect. I love it when things come together. Good job. Sometimes I find just talking through things with someone can help.

Thanks,
Chad
0 Kudos