如何在小升级期间从安装程序中删除文件

发布于 2024-11-27 13:22:20 字数 85 浏览 1 评论 0原文

在InstallShield 2011的小升级期间,如何删除/删除从基本安装程序安装的一些文件,以及在下次升级时如果我们想找回已删除的文件,我们该如何找回?

During Minor Upgrade in InstallShield 2011, how to delete/remove some files which was installed from base installer and for next upgrade if we want to retrieve back the removed files how can we get back?

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

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

发布评论

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

评论(1

夏の忆 2024-12-04 13:22:20

总体建议每个组件使用一个文件。这避免了各种组件引用问题,您可以复活
重大升级的文件(如果您需要在删除它们后将其恢复)。

请注意,如果您有以前的版本,则通常无法直接切换到使用主要升级,而不需要彻底清除并安装到不同的位置。更改安装目录并对所有文件使用新的组件 GUID 会清除所有旧组件的引用错误。


次要升级限制:次要升级对于您在升级场景中允许执行的操作有很大限制。 我之前写过对此的摘要,我会将其发送给您以快速阅读该主题

快速提示:我几乎从不使用次要升级(原因在您阅读上面链接的答案后就清楚了),但这里有一些摘录自 Stefan Kruger 的检查列表(MSI 和部署专家 - MVP):

  • 您可以修改成分(添加、删除或修改文件、注册表项和快捷方式),但前提是该组件不跨功能共享。
  • 如果从组件中删除文件或注册表项,则必须分别填充RemoveFile 或RemoveRegistry 表以删除孤立资源。

虽然内容有些陈旧,但我相信以上是正确的。

重大升级:我强烈建议您将来进行重大升级。如果您对组件规则非常严格并且不违反任何引用规则,则可以使用 Late REP 可靠地安装主要升级 - 正如我们所说 - 这意味着新版本将作为补丁安装现有文件的顶部,然后仅删除过时的文件(与完全卸载旧版本然后安装新版本的 Early REP 相反)。 此处详细介绍早期/晚期 REP


链接

Overall Suggestion: Use one file per component. This avoids all kinds of component referencing problems and you can resurrect
files on major upgrades if you need to bring them back after removing them.

Note that you generally cannot switch directly to using major upgrades if you have prior releases without wiping the slate clean and installing to a different location overall. Changing the installation directory and using new component GUIDs for all files wipes the slate clean and you are decoupled from old component referencing sins.


Minor Upgrade Limitations: Minor upgrades are very restrictive with regards to what they allow you to do in an upgrade scenario. I have written a summary of this before, and I will send you there for a quick read on the topic.

Quick Tips: I almost never use minor upgrades (for reasons that are clear after you read the above linked answer), but here are some extracts from Stefan Kruger's check list (MSI and deployment expert - MVP):

  • You can modify the contents of a component (add, remove or modify files, registry keys and shortcuts), but only if that component is not shared across features.
  • If you remove a file or registry key from a component, you must populate the RemoveFile or RemoveRegistry table respectively to delete the orphaned resource.

Though aging content, I believe the above is correct.

Major Upgrade: I would strongly recommend that you go for major upgrades in the future. If you are very strict with the component rules and don't break any referencing rules, you can reliably install major upgrades with Late REP - as we call it - meaning that the new version installs as a patch on top of existing files and then only removes obsolete files (as opposed to Early REP which fully uninstalls the old version and then installs the new version). A little bit more on Early / Late REP here.


Links:

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