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

Install features if selected by user


4 replies to this topic

vaqueros

vaqueros
  • Full Members
  • 53 posts

Posted 19 December 2007 - 23:10

I created a property called ProgramChoice. The default value is Word. I have a dialog screen where the user is presented with two ProgramChoice options. First and default option is "Word" second option is "Office".

I added an install Condition on both features according to what the user selects. However the setup behaves as if "Word" is always selected. It will always be available in the CustomSetup screen.

Per a forum post I created a CA to modify the value of ProgramChoice and added it to the Next button Event. I confirm that the value is being read by displaying it on the next screen but still, the "Word" feature is available for install in the CustomSetup screen and the "Office" feature is not.

Where do I go from here?
Thank you in advance.

-Eric


KathyMorey

KathyMorey
  • Full Members
  • 111 posts

Posted 20 December 2007 - 14:54

Could you give a little more detail about how you set this up? If you set a property through a dialog, using that property in the condition should be sufficient, without an additional custom action.

What kind of control are you using for the options? How are you formatting your condition? Have you tried using a public property (all caps) rather than a private property?

Is this an MSI or and InstallScript MSI project? What does a log file show for setting the property and evaluating the condition?
Kathy Morey
Synergy Software Engineer
ProfitStars, a Jack Henry Company
kmorey@profitstars.com

vaqueros

vaqueros
  • Full Members
  • 53 posts

Posted 20 December 2007 - 15:29

I assigned these two features an install level of 250. For both features I created a Condition that changes the InstallLevel to "1". Here is the syntax:

ProgramChoice = "Office"

I created a ProgramChoice (tried it all caps as well) property. I set "Word" as the default. The CustomSetup screen will always have the "Word" feature as available to install and not the "Office" feature even though "Office" was selected via a RadioButtonGroup.

I thought the value wasn't retrieved from the RadioButtonGroup so I created a CA that changes the ProgramChoice Property to "Office" if the Office radio is selected. Still, the CustomSetup screen displays the "Word" feature ready to be installed and not the "Office" feature.

Hope that helps!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 December 2007 - 16:44

Feature conditions are evaluated during CostFinalize, which happens before the dialogs are displayed. Instead, add control events AddLocal and Remove to the Next button of the dialog with approriate conditions based on the radio selection.

vaqueros

vaqueros
  • Full Members
  • 53 posts

Posted 20 December 2007 - 19:56

Thank you, one more time, for your expertise Mr Krueger. Your suggestion did the trick! Adding the AddLocal and Remove events proved to be what I was looking for.

Thank you all for replying.