Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Display Dialog if Feature Selected


3 replies to this topic

mwieder

mwieder
  • Members
  • 2 posts

Posted 17 October 2002 - 19:36

Hi - I'm using WfWI 4.2 and would like to conditionally display a dialog depending on what feature the user selects.  We have two features, a server and a client.  

Attempt 1) Using WfWI features, once the user selects the feature in their "Select Feature Dialog" I can't find a way to access the selection and find out what they chose.  Only much later (after the UI section) does that data become available.  

2) I tried making my own dialog for feature selection, but I don't see how to hook that up to set the features to be installed or not.  

3) Then I tried to have only one feature and create my own dialog which sets a property and I put a condition on all my components and only install based on how they responded in the dialog.  This works well and allows me to display the dialog I want to on condition of the property, but I get a different issue.  If the user wants to come back and install the other component some other time, the condition is not re-evaluated and no files are dropped.  Even after I set "check condition during reinstall" it still does not drop the files on a second running of the script.

I can't believe that something this simple hasn't been solved so please help me out.  

thansk!

Leigh Ravenhall

Leigh Ravenhall
  • Members
  • 269 posts

Posted 17 October 2002 - 23:45

After the feature selection dialog, you can display dialog's conditionally by using &FeatureName > 3.

&FeatureName > 3 only evaluates to true if FeatureName is being installed.
Leigh Ravenhall
Expert Information Services

mwieder

mwieder
  • Members
  • 2 posts

Posted 18 October 2002 - 13:52

Hi - as I ssaid, that condition doesn't evaluate properly until after the cost finalize action in the execute immediate sequence, which is well after the user interface dialogs where I need the knowledge.

Geoff

Geoff
  • Members
  • 1 posts

Posted 22 November 2002 - 00:35

I had the same problem and solved it this way:

Create a custom action in a DLL that sets a property to "Yes" or "No" depending on whether or not the feature was selected, then use this property as a condition for your dialog.

The code for the custom action can use MsiGetFeatureState to determine whether or not the feature is being installed.  The action can be invoked by the Next button of the CustomSetup dialog.