cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Swilks
Level 5

Installlevel - What am I doing wrong ?

Hello All,

I'm only wishing to install a feature based upon the value of a property that is set during the UI. I add the feature and set its InstallLevel = 0.

I then add a condition to that feature.
Level 1...... PROPERTY=1.

I figured that the initial state of the Feature is 0 therefore it will not be installed. However if PROPERTY=1 it sets the InstallLevel of the feature to 1.

However at runtime this just doesn't happen and although the PROPERTY=1 that feature is never installed. What have I missed or misunderstood about how the Feature Conditions are meant to work?

Many Thanks
Labels (1)
0 Kudos
(4) Replies
gbaltazar
Level 6

A feature is installed only if its InstallLevel value is less than or equal to the current INSTALLLEVEL value (check property manager). The initial InstallLevel value for your feature should be higher, and when the property is set, it should be set lower.
0 Kudos
Swilks
Level 5

Thanks. I made those corrections.

The INSTALLLEVEL Property is set to 100.

The default Installlevel of my feature I have set to 200. (so it will not install by default). The condition is set to Level 1.... PROPERTY=1.
No matter what the property value is the feature is always installing.

I will have a look at other ways around this now as I cannot see I have done anything wrong reading the guidlines. The condition should be evaulated as false therefore it should never run. However something is evaluating the feature condition as true.
0 Kudos
cbragg
Level 7

Firstly, check the property dump at the end of your installation log and see if the value of your property is what you would expect, if not then your logic is wrong somewhere.

If the above is correct then you need to look at the sequencing. The installer decides whether or not to install a feature based on its install levels at the cost finalize stage. If your property is being set after that then it won't take affect
0 Kudos
Swilks
Level 5

Sorry for the delay in reply as I have been on an extended break over xmas.

You were right in that the CostFinalise runs before the Interface begins and it is from the interface from which I am setting the properties that are in the Features InstallLevel condition. Can I re-locate the CostFinalise to the point in the interface in which the properties are set ?

The goal is...
I have a feature that I only wish to install if a tick box has been ticked during the installation routine (I do not wish to provide access to the custom screem). What other options are available to achieve my goal. I dont really fancy having to place a condition against each of the components within that feature.

Apologies if this is a basic question. I am knew to Installshield. The other product I was using would allow for what I was attempting above with a condition containing properties sitting under a feature. I just need to know how this is done in InstallShield and I will be away.

Many thanks in advance.
0 Kudos