InstallShield2010 XML 文件修改和卸载时的更改

发布于 2025-01-06 16:31:46 字数 377 浏览 1 评论 0原文

我已经成功地获得了概念验证 MSI 安装程序,创建了一个 xml 文件,并在全新安装时按照我的意愿更新了元素。 我有 6 个功能,如果选择安装该功能,我希望为该功能创建一个节点,并根据属性设置一个属性。

如果我修改安装并删除以前安装的功能,我希望为其创建的 xml 节点持续存在并且我希望将我在安装时设置的属性设置为基于相同的属性进行更新(现在有不同的值)。

是否可以利用 InstallShield 的现有功能来做到这一点?看来我可以,并避免在删除功能时编写自定义操作来更新我的 xml。关于 isxmlcfg.dll 及其中的自定义操作似乎没有太多文档。

当我删除某个功能时,CA ISXmlUnInstall 正在运行 - 但似乎该操作所做的只是删除节点或保留它...

I've successfully got my proof of concept MSI installer creating an xml file, and updating the elements as I wish on a fresh install.
I have 6 features, if the feature is selected to be installed I want a node created for that feature and an attribute set based on a property.

If I modify the install and remove a feature previously installed, I want the xml node created for it to persist and I wish to set the attribute I set on install to be updated based on the same property (which now has a different value).

Is it possible to leverage InstallShield's existing functionality to do this? It seems I could, and avoid writing a custom action to update my xml when removing a feature. There doesn't seem to be much documentation on isxmlcfg.dll and the custom actions in it.

the CA ISXmlUnInstall is running when I remove a feature - but it appears all that action does is remove the node or leave it...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

在你怀里撒娇 2025-01-13 16:31:46

您可能遇到的问题是,尽管您在某些内容(例如注册表、ini 或 xml)中使用了该属性,但 Windows 安装程序本身并不将属性保留在其数据库中。你必须自己做这件事。因此,如果您想要进行修复、更改、升级或其他操作,并且想要拥有相同的属性数据,您不仅必须将其保存到某些内容(例如 xml ),而且还必须拥有相应的 AppSearch ( XmlSearch )可以将其拉回到属性中,以便它具有在 UI 期间显示的值和/或稍后写回 XML。

还可以考虑支持一种模式,仅当实际属性尚未具有值时,才将其读入临时属性并分配给实际属性。这样,某人就可以进行静默安装(升级)并传入该属性作为对先前配置的覆盖。 (搜索不会造成破坏)

The problem you are probably encountering is the fact that although you used the property in something ( say registery, ini or xml ) windows installer doesn't natively persist properties in it's database. You have to do this your self. So if you want to do a repair, change, upgrade or whatever and you want to have that same property data, not only do you have to save it to something ( say xml ) but you also have to have a corrosponding AppSearch ( XmlSearch ) that can pull it back into the property so it has a value to be shown during the UI and or writing back out to XML later.

Also consider supporting a pattern where it get's read into a temp property and assigned to the real property only if the real property doesn't already have a value. That way someone could be doing a silent install ( upgrade ) and pass in the property as an override to what was previously configured. ( No clobbering by the search )

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文