Manually migrate feature states during upgrade

自闭症网瘾萝莉.ら 提交于 2019-12-24 03:13:06

问题


We have a product for which the feature tree has changed considerably between versions, so the MigrateFeatures="yes" option on the UpgradeVersion element does not seem to work.

How would I go about manually converting the old features to the new ones? Do I need a custom action, and if so, how can I do this from there?


回答1:


As far as I know, the feature tree structure isn't relevant - it matches the Name in the Feature table, so if they all match you'd still get some migration. Note that it is the Name, not the Title so it's ok if the Name is the same but the Title in the UI is different. So it depends on exactly what has changed, if it's just the layout or many of the Name values too.

Otherwise you'd need custom actions to set ADDLOCAL to set the list of features from the installed list, which you'd need to query with MsiEnumFeatures and then MsiQueryFeatureState. Or the code could be in an external launcher which finds installed features and then launches the MSI with an ADDLOCAL command line of the features, presumably not offering the feature dialog. I think that's the only way.



来源:https://stackoverflow.com/questions/28172169/manually-migrate-feature-states-during-upgrade

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!