Posted 13 May 2002 - 14:29
In Installscript im using
retFeature = MsiGetFeatureState ( ISMSI_HANDLE, "FeatureName", sFeatureState, sActionState );
to determine in which feature and in which mode I am. But I'm really confused about the values of sFeatureState an sActionState.
- selected feature sFeatureState = 2 and sActionState = 3
- unselected feature sFeatureState = 2 and sActionState = 3
- selected feature sFeatureState = -1 and sActionState = 3
- unselected feature sFeatureState = -1 and sActionState = 2
- feature sFeatureState = -1 and sActionState = -1
but on at another feature: sFeatureState = 3 and sActionState = 2 or sFeatureState = 2 and sActionState = -1
Does anyone know how to handle the return values of MsiGetFeatureState, or has a better idea?
The Installscript-code should only be executed when it is an selected feature and is not in uninstallation-mode.
Posted 13 May 2002 - 17:29
Where in the sequence is this code being run?
Posted 14 May 2002 - 06:11
It's a MSI project and some features rum just before InstallFinalize and some must run after.
Posted 14 May 2002 - 14:19
You mean some CustomActions, surely?
You should be very careful what you do after InstallFinalize because you lose some of the properties and such. I've had some bizarre results trying to do things at the end of an installation and managed somehow to squeeze them all into the deferred area instead. Any hope you can do the same?
Posted 16 May 2002 - 09:27
Posted 16 May 2002 - 09:55
See the bottom of article "Conditional Statement Syntax" in the MSI Help file for information on that. It may go some way to explain the feature states you're getting too.
If you still have questions then come back here