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

Evaluate control condition after custom action

I'm using a Basic MSI project. I'm working on our customer information dialog. The user must enter their registration key. When they press next we send a request to a server to confirm that the key is valid. If the key is valid we continue to the next dialog. If not, we stay on the same dialog. I'd like to make a text control visible to give the user some feedback depending on the result of the custom action. I've got a condition on a text control to make it visible, but I doesn't seem like the condition gets reevaluated after the custom action returned.

Any ideas?
Labels (1)
0 Kudos
(4) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Yeah, this is a limitation of MSI UI. You can possibly work around it a couple different ways:

  • Set a temp property in the action, and use a set property control event to set the real one; MSI tracks this
  • Show a message box from the custom action (or spawn a message dialog from an additional control event)
  • Create a duplicate dialog and switch between them to force MSI to refresh the label properties
0 Kudos
EJSchuiteman
Level 4

Set a temp property in the action, and use a set property control event to set the real one; MSI tracks this.

How can this be done?

I have a doAction on the next button of a dialog.
This will set an TEMPPROP.

Then I do another doAction and then call the Set Property??

And after this a new dialog with condition is the property?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

You can have multiple control events associated with one action; just make sure to enter them such that the execute in the correct order. (You can check or change things in the ControlEvent table in the Direct Editor if you're unsure.) The issue is that MSI doesn't trigger property updates off calls to MsiSetProperty (or Session.Property(...), etc.) within a DoAction; it only triggers off of the set property control events.

So first you'll want the custom action control event DoAction;MyActionSetsTEMPPROP, then you'll want the set property control event [REALPROP];[TEMPPROP]. Then for Christo's case, the NewDialog would be conditioned somehow on REALPROP or TEMPPROP.
0 Kudos
EJSchuiteman
Level 4

After some testing it works! Thanks for the help.

I made a custom Action "MyCustomAction" which checked if name already exists in IIS. If Yes then [TESTPROP] = "1" and No then [TESTPROP] = "0".

Then I added the following events on the Next button.

Event Argument Condition
DoAction MyCustomAction 1
[GOODPROP] [TESTPROP] 1
NewDialog _MyNextDialog [GOODPROP] = "0"

When the name exists I want to show some text.
I added the Actions Show and Hide on the Conditions table of the label with the conditions [GOODPROP] = "0" & [GOODPROP] = "1".
0 Kudos