This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Determining installed features during a modify install
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Jan 16, 2009
12:08 PM
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
Is this the right function to call? What should I be using for szFeatureSource?
Thanks,
-Ed
(1) Reply
Jan 23, 2009
12:53 PM
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;
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;