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
- :
- Re: Advanced UI/Suite Detect Installed MSI Features
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 13, 2013
11:18 AM
Advanced UI/Suite Detect Installed MSI Features
Hello,
I've created the suite installation that installs MSI with features. It allows user to select one or more features. Now I am creating major upgrade for this product and I need to upgrade only the features the user previously installed. However since the upgrade have new product code, the suite installer does not detect which features are installed and select all of them for upgrade. Is there any way how to detect the installed features or tell the msi to upgrade only what is installed?
I used technique described here for the original suite: http://blogs.flexerasoftware.com/installtalk/2013/01/configuring-package-features-from-a-suiteadvanced-ui-or-advanced-ui-installer.html
Many thanks,
Marek
I've created the suite installation that installs MSI with features. It allows user to select one or more features. Now I am creating major upgrade for this product and I need to upgrade only the features the user previously installed. However since the upgrade have new product code, the suite installer does not detect which features are installed and select all of them for upgrade. Is there any way how to detect the installed features or tell the msi to upgrade only what is installed?
I used technique described here for the original suite: http://blogs.flexerasoftware.com/installtalk/2013/01/configuring-package-features-from-a-suiteadvanced-ui-or-advanced-ui-installer.html
Many thanks,
Marek
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 18, 2013
09:41 AM
The solution was quite easy after all but for someone who is not experienced c++ programmer it can be tough. I created suite custom action where I detect which msi features are installed and set the suite feature action state accordingly.
It looks like:
[CODE] __declspec(dllexport) HRESULT __stdcall DetectUpgradePreviousInstalledFeatures(IDispatch *pDispSuiteUIExtension)
{
CComQIPtr spSuiteUIExtenstion = pDispSuiteUIExtension;
wchar_t productCode[255];
if(MsiEnumRelatedProducts(L"{MSIUPGRADECODEGUIDINBRACKETS}", 0, 0, productCode) == 0){
INSTALLSTATE featureState = MsiQueryFeatureState(productCode, L"FeatureName");
spSuiteUIExtenstion->put_Property(CComBSTR(L"FEATURE[FeatureName].actionState"), featureState == 3 ? CComBSTR(L"install") : CComBSTR(L""));
}
return S_OK;
}
[/CODE]
Of course there is need to add msi.h headder and add msi.lib to linker.
It looks like:
[CODE] __declspec(dllexport) HRESULT __stdcall DetectUpgradePreviousInstalledFeatures(IDispatch *pDispSuiteUIExtension)
{
CComQIPtr
wchar_t productCode[255];
if(MsiEnumRelatedProducts(L"{MSIUPGRADECODEGUIDINBRACKETS}", 0, 0, productCode) == 0){
INSTALLSTATE featureState = MsiQueryFeatureState(productCode, L"FeatureName");
spSuiteUIExtenstion->put_Property(CComBSTR(L"FEATURE[FeatureName].actionState"), featureState == 3 ? CComBSTR(L"install") : CComBSTR(L""));
}
return S_OK;
}
[/CODE]
Of course there is need to add msi.h headder and add msi.lib to linker.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 18, 2013
05:12 PM
Alternatively, one can set msidbUpgradeAttributesMigrateFeatures in Attributes column in Upgrade Table.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 19, 2013
10:42 AM
TsungH wrote:
Alternatively, one can set msidbUpgradeAttributesMigrateFeatures in Attributes column in Upgrade Table.
This is also a solution for standard msi upgrade. But you cannot map the msi features to Suite features with only this set. Thank you for your reply.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)