teh hAhN
Posts: 3
Joined: Thu Jun 01, 2006 2:00 pm

Problem with conditional levels

Hi@all,

for a start, my english is not the best, so sorry for that.

I'm evaluating Advanced Installer at the moment and i have problems with setting conditional levels for seperate features.

I created four features (Feature1, Feature2, Feature3 and Feature4, from which Feature1 is the main feature which should be always installed (I did this with the "UI Disallow Absent"-flag.

Now my problem: I want to install the other features by the "Custom Setup"-option. When I chose Feature2, for example, Feature3 and Feature4 should not be installed and it shouldn't be possible to chose them. So all in all, when i chose a subfeature (Feature1, Feature2 or Feature3) the other subfeatures should be automatically disabled. I didn't get to realize that.

Is there a possibility to do something like that?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I don't really know if this can be achieve. Also it is not a good practice to condition the installation of a feature based on another. However if you really want to organize your project in this way then I shall investigate and let you know how you can do it.

Regards,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
teh hAhN
Posts: 3
Joined: Thu Jun 01, 2006 2:00 pm

Hi,

yeah it would be nice, if you could do that. (If it is not too much work!)
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Please try the following scenario:
Create in the organization page your features like this:

Code: Select all

+Feature1 (the main feature with UI Disallow Absent)
   +Feature2
      +Feature3
         +Feature4
In this order will appear in the "CustomizeDlg" and when you disable Feature3 then the Feature4 will be disabled automatically and not installed.

Please let me know if this is what you want.

Regards,
Gigi
________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
teh hAhN
Posts: 3
Joined: Thu Jun 01, 2006 2:00 pm

My Organisation looks like this
+MainFeature
|___+Feature1
|___+Feature2
|___+Feature3

When I choose Feature1, Feature2 and Feature3 shouldn't be available.
When I choose Feature2, Feature1 and Feature3 shouldn't be available.
When I choose Feature3, Feature1 and Feature2 shouldn't be available.

Thats It, but I don't know how to realize that...
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I suggest you to create a custom dialog and create for each Feature a radio button. In this way the user can select only one feature to install. After this condition the features with the property of the Radio Button Group. Each radio button has a value in the "Properties" list. The property of the Radio Button Group have the value of the selected radio button. For example use following condition for the Feature1:

Code: Select all

RADIOGROUP = 1
Where RADIOGROUP is the property of the Radio Button Group and 1 is the value of the selected radio button. If you encounter any problem please let me know.

Regards,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
SimonG
Posts: 1
Joined: Wed Aug 09, 2006 2:11 pm

gigi wrote:Hi,

I suggest you to create a custom dialog and create for each Feature a radio button. In this way the user can select only one feature to install. After this condition the features with the property of the Radio Button Group. Each radio button has a value in the "Properties" list. The property of the Radio Button Group have the value of the selected radio button. For example use following condition for the Feature1:

Code: Select all

RADIOGROUP = 1
Where RADIOGROUP is the property of the Radio Button Group and 1 is the value of the selected radio button. If you encounter any problem please let me know.

Regards,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
I have tried exactly this in a similar situation

we have a set of core files.
and based on a user's selection at a dialog box containing a radio button group we want to install a set of supplemental files.

the property seems to be getting set (i put a static text box pointing to it on subsequent dialog screens and can see its contents) but the conditional statements on each feature seems to ignore it.

I am using CAPS for the property names- so it should be a global variable?

if i spawn an external vbscript and use the session.property(etc...) command to return a variable it works 100%

any ideas?
DIMEDROLL
Posts: 1
Joined: Sat Aug 19, 2006 8:22 am
Contact: ICQ

Hi.
I have the same problem. I've tryied to create a radio button group
There are three radiobuttons, each have a different value:
1
2
3
Radio button group property name is LANGUAGERADIOBUTTONGROUP_1_PROP
I've set the condition for each feature:
LANGUAGERADIOBUTTONGROUP_1_PROP = 1
LANGUAGERADIOBUTTONGROUP_1_PROP = 2
LANGUAGERADIOBUTTONGROUP_1_PROP = 3
but it doesn't work
How can solve this problem?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

The problem is that the "Condition Table" (where the features are conditioned) is referred when "CostFinalize" standard action is executed. And the "CostFinalize" standard action gets executed before the radio group property is changed.

Here is other approach:

In the "Organization" page remove all conditions used for your features. Set 1 as InstallLevel value for each feature.

Switch to "Custom Actions" page and create a "New Attached Custom Action" (select the .vbs file) under "UI Custom Actions" section. the "Function Name" field must be empty.

The .vbs file must be like this:

Code: Select all

selFeature = Session.Property("RADIOBUTTON")

Session.FeatureRequestState("Feature1") = 2
Session.FeatureRequestState("Feature2") = 2
Session.FeatureRequestState("Feature3") = 2

if selFeature = "1" then
  Session.FeatureRequestState("Feature1") = 3
end if

if selFeature = "2" then
  Session.FeatureRequestState("Feature2") = 3
end if

if selFeature = "3" then
  Session.FeatureRequestState("Feature3") = 3
end if  
Where RADIOBUTTON is the property of the radio group control. Under "Install" button of the "VerifyReadyDlg" add a published event like this:
Name: DoAction
Argument: select the custom action previously added.

Hope this helps.

Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”