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

MsiGetFeatureState


3 replies to this topic

abc

abc
  • Members
  • 9 posts

Posted 23 August 2001 - 19:31

i am having trouble getting the correct feature state when i call the MsiGetFeatureState function.  I always get a value of 2 which represents INSTALLSTATE_ABSENT.  I assume this is happening because it can not find the feature which i have passed in as a parameter.  But i do not know where i am going wrong because i am hard coding the feature name into the function call.

ie.

lState=MsiGetFeatureState(hMSI,"featureName",installState,tempNum);

i always get a value of 2 for installState.

Any help or suggestions would be appreciated


BobRouse

BobRouse
  • Members
  • 82 posts

Posted 06 September 2001 - 20:23

Try checking the value of your tempNum variable. I think the function is not documented very well.

Bob Rouse
Netuitive, Inc.


Leigh Ravenhall

Leigh Ravenhall
  • Members
  • 269 posts

Posted 06 September 2001 - 22:56

MsiGetFeatureState returns two integer values.  The first integer gives the current state of the feature.  If you are performing an installation on a machine for the first time, then the value of two is correct, because the feature currently doesn't exist on the machine.

The second integer is the action state of the feature.  This is what is going to happen to the feature during this installation.  For example, if the feature is going to be installed to the local drive, it will have an action state of 3.

Hope this helps.