在升级期间手动迁移功能状态 [英] Manually migrate feature states during upgrade

查看:21
本文介绍了在升级期间手动迁移功能状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个产品,其功能树在版本之间发生了很大变化,因此 UpgradeVersion 元素上的 MigrateFeatures="yes" 选项似乎不起作用.

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?

推荐答案

据我所知,特征树结构并不相关 - 它与特征表中的名称匹配,所以如果它们都匹配,你仍然得到一些迁移.请注意,它是名称,而不是标题,因此如果名称相同但 UI 中的标题不同,则可以.所以这取决于究竟发生了什么变化,如果它只是布局或许多 Name 值也是如此.

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.

否则,您需要自定义操作来设置 ADDLOCAL 以设置已安装列表中的功能列表,您需要使用 MsiEnumFeatures 和 MsiQueryFeatureState 进行查询.或者代码可能在一个外部启动器中,它找到已安装的功能,然后使用功能的 ADDLOCAL 命令行启动 MSI,大概不提供功能对话框.我认为这是唯一的方法.

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.

这篇关于在升级期间手动迁移功能状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆