I was given this logic from IS support, but have not had it work yet. I'm trying to have a file installed IF a component is NOT installed. So user deselects feature A1 then I would install X file to show my app that A1 has been de-selected. I'm new to Installshield and could use any suggestions or ideas you might have. So far I've tried to add the logic to the feature's condition "Not &featurename=3" I'm assuming the logic should be in the condition of the Feature and not the component. thx in advance
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.
Not &MyFeature=3
Started by
Lobo
, Jul 06 2001 17:13
8 replies to this topic
Posted 10 July 2001 - 11:12
Try to use "&featurename<>3".
For removing features from existing instalation you can use "&featurename=2". It means that feature is assigned for removing (it works at my setup).
Maybe this approach can be used during setup to.
For removing features from existing instalation you can use "&featurename=2". It means that feature is assigned for removing (it works at my setup).
Maybe this approach can be used during setup to.
Darko JAMNIK, Slovenia
Posted 15 July 2001 - 18:25
The problem is, that the condition at Features and Components are evaluated at standard action CostFinalize, but this is run before InstallWellcome.
You can select Components after CostFinalize with API-Function MsiSetComponentState. This should be done in a CA after the dialogs.
Posted 15 July 2001 - 20:19
Thanks...I've been trying the CA's. I figured from a previous article that I couldn't do the eval because the answer was always "no" the component is not installed.
I'll try to get a ca to do it.
I'll try to get a ca to do it.
Posted 01 August 2001 - 20:56
Martin's given you half the solution. Your originally-stated problem was trying to detect if a feature had been de-selected. MsiGetFeatureState() will return the selection state of a feature. The 2nd arg is the feature name, and you don't have to use the topfeature\\subfeature notation, just give the feature name. Checking the returned value in piAction will tell you if feature A1 is selected or not, and then you can use MsiSetComponentState to select X file for installation.
Which piAction values indicate that the feature is selected?
Valid states for a feature are determined by checking all components that are linked to the specified feature without taking into account the current installed state of any component. If any of these components have a value of IRSOPTIONAL in the RunFromSource column, or if at least one component is marked IRSTLOCALONLY and at least one other component is marked IRSSOURCEONLY, then both INSTALLSTATE_LOCAL and INSTALLSTATE_SOURCE are valid states for the feature. If all components are set to IRSLOCALONLY, INSTALLSTATE_LOCAL is the only valid state. If all components are set to IRSSOURCEONLY, INSTALLSTATE_SOURCE is the only valid state.
...so you need to check only the states that are valid for the particular feature.
Which piAction values indicate that the feature is selected?
Valid states for a feature are determined by checking all components that are linked to the specified feature without taking into account the current installed state of any component. If any of these components have a value of IRSOPTIONAL in the RunFromSource column, or if at least one component is marked IRSTLOCALONLY and at least one other component is marked IRSSOURCEONLY, then both INSTALLSTATE_LOCAL and INSTALLSTATE_SOURCE are valid states for the feature. If all components are set to IRSLOCALONLY, INSTALLSTATE_LOCAL is the only valid state. If all components are set to IRSSOURCEONLY, INSTALLSTATE_SOURCE is the only valid state.
...so you need to check only the states that are valid for the particular feature.
(Edited by rflum at 4:36 pm on Aug. 1, 2001)
Posted 15 July 2002 - 05:58
Hi,
I have been looking for the same solution. I need more information on the part where &FEATURE_NAME=2, Can someone tell me where to get the full details of the state number? eg:
&FEATURE_NAME=2, what does 2 mean
&FEATURE_NAME>3, what does >3 mean
Thanks.
KC
I have been looking for the same solution. I need more information on the part where &FEATURE_NAME=2, Can someone tell me where to get the full details of the state number? eg:
&FEATURE_NAME=2, what does 2 mean
&FEATURE_NAME>3, what does >3 mean
Thanks.
KC
Posted 15 July 2002 - 09:20
The possible values are described in Windows installer help. Search for "Conditional Statement Syntax" or use this link for online doku: Conditional Statement Syntax. Near the end of the chapter the values and there meaning are listed.
h.teichert-ott