cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
EKallen
Level 3

Determining installed features during a modify install

I'm trying to determine which features are already installed during a Modify install. I've tried using FeatureIsItemSelected, but I'm not sure what to pass in for the szFeatureSource parameter. I've tried MEDIA, but that seems to return TRUE regardless.

Is this the right function to call? What should I be using for szFeatureSource?

Thanks,
-Ed
Labels (1)
0 Kudos

(1) Reply
EKallen
Level 3

I found the answer! The function to call is MsiGetFeatureState. My code now looks something like this:

NUMBER nInstalled, nAction;
BOOL bFeatureInstalled;

//...
if (MsiGetFeatureState(IMSI_HANDLE, "FeatureName", nInstalled, nAction) = ERROR_SUCCESS) then
if (nInstalled = INSTALLSTATE_LOCAL) then
bFeatureInstalled = TRUE;
else
bFeatureInstalled = FALSE;
endif;
else
//...
endif;
0 Kudos