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

Dialog Control's sequence ignoring conditionals - help!

Hello all,

I've got a dialog box with a control. The sequence associated with it begins by running a custom action in a .dll via DoAction. That custom action runs a separate, independent script on the command line and, based on the results, sets a private property that the installer is supposed to use to choose which dialog to display. Though I can't get any debugging output for custom actions run by the DoAction event from dialog boxes (why?), I can tell thanks to separate logging by the independent script that the custom action is running and interpreting the results correctly. What I am getting from the install log, though, is that the property's value is in fact changing when the custom action is run, getting set to the value I expect, which happens to be the string "Missing".

For example's sake, I see this in the log:

PROPERTY CHANGE: Modifying MyProperty. property. Its current value is '"Unset"'. Its new value: 'Missing'.

After the DoAction, I have three NewDialogs. The first two are paths based on the value of MyProperty. For this case, the second one is the one I want to execute, since it has the following condition:

MyProperty.="Missing"

But I never see the dialog box! Even though the log says the property changed to "Missing" during the running of the custom action, and thus prior to getting to that conditional, and the property dump after I cancel installation says that the property has a value of "Missing" after that dialog is long passed running.

I'm totally stumped as to why this conditional isn't evaluating to true. Please help!
Labels (1)
0 Kudos
(2) Replies
wallywojo
Level 4

for just debugging purposes what about putting a condition on one of your controls on that dialog and checking for "Missing" to see when it returns if it is getting that value back as you expect. It takes your testing one step further for the scope of recognition and might help pinpoint where it is dropping.
0 Kudos
selhurstpark
Level 2

If you have more than one NewDialog specified, Windows Installer evaluates the NewDialog conditions from the "bottom up", e.g.

DoAction SetMyProp 1
NewDialog Dialog1 MyProp=1
NewDialog Dialog2 MyProp=2
NewDialog Dialog3 1

Dialog3 will always be displayed regardless of the value of MyProp, as its condition is set to true (1) and it is the first NewDialog condition to be evaluated.

To make the above example work, you would need to change the sequence to:

DoAction SetMyProp 1
NewDialog Dialog3 1
NewDialog Dialog1 MyProp=1
NewDialog Dialog2 MyProp=2


Chris Timms
Selhurst Associates
www.selhurst.com
0 Kudos