从 InstallScript 项目转换为 Basic MSI 的可行性

发布于 2024-10-20 02:41:46 字数 1324 浏览 6 评论 0原文

我有一个纯 InstallScript 项目,由于 这个而导致出现问题问题。通过添加一些在安装新文件之前擦除特定目录的 InstallScript 暂时解决了这个问题,但这并不理想。然而,这一系列论坛帖子表明InstallScript MSI 项目或 Basic MSI 项目将大大简化升级时动态链接文件的删除。

在搜索 Flexara 论坛时,我发现很多帖子都反对 InstallScript MSI 项目类型,因此我正在查看 Basic MSI。显然 Flexara 有一款名为 Repackager 的产品,可以将 InstallScript 项目转换为 Basic MSI。然而,它只配备了IS Premier或Admin Studio,这意味着我们必须花一些钱。在我走这条路之前,我需要一些迹象表明这可能会奏效。

  • 使用 Repackager 工具从 InstallScript 转换为 Basic MSI 时是否会丢失任何功能?我们的脚本中有相当多的逻辑,包括 在安装的多个步骤中传递信息。我们还使用了几个 InstallShield NT 服务对象,我相信我必须与 IS2010 分开安装这些遗留对象。 InstallScript 项目是否有已知 Repackager 无法处理的某些方面?
  • 如果重新打包程序不会神奇地转换项目,是否有我可以遵循的指南来手动进行转换?我发现 InstallShield 文档和论坛非常缺乏。
  • 有没有办法让生成的基本 MSI 安装包能够在安装了旧版本(纯 InstallScript)的系统上执行升级安装?这确实是一个额外的好处。此时,我预计我们将被迫进行完全卸载/重新安装。

I have a pure InstallScript project, which turns out to be problematic due to this issue. It was temporarily resolved by adding some InstallScript that wipes a particular directory before the new files are installed, which is not ideal. However, this series of forum posts indicates that an InstallScript MSI project or Basic MSI project would greatly simplify the removal of dynamically linked files on upgrade.

Searching the Flexara forums, I find a lot of posts railing against the InstallScript MSI project type, so I'm looking at Basic MSI. Apparently Flexara has a product called Repackager that can convert InstallScript projects to Basic MSI. However, it only comes with IS Premier or Admin Studio, which would mean we have to spend some money. Before I go down that road, I need some indication that this is likely to work.

  • Can any functionality be lost when converting from InstallScript to Basic MSI with the Repackager tool? We have a fair bit of logic in our scripts, including things like this that pass information across several steps of the installation. We also use several InstallShield NT Service Objects, legacy objects I believe I had to install separately from IS2010. Are there any aspects of InstallScript projects the Repackager is known to not handle?
  • If the Repackager isn't going to magically convert the project, is there a guide somewhere that I can follow to do the conversion manually? I have found the InstallShield documentation and forums to be pretty severely lacking.
  • Is there any way the resulting Basic MSI install package will be able to perform upgrade installs on systems where an old (pure InstallScript) version is installed? This would really be a bonus. At this point I'm expecting we'll just be forced to do a full uninstall/reinstall.

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

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

发布评论

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

评论(2

白昼 2024-10-27 02:41:46

出于与克里斯托弗提到的相同原因,我不会推荐重新打包程序解决方案。

InstallScript 项目和新的 Basic MSI 项目之间的一个良好桥梁是创建一个使用 InstallScript 自定义操作的新 Basic MSI 项目。通过这种方法,MSI 引擎将管理安装的非专有方面,并且可以重用旧的 InstallScript 代码来管理安装的专有方面。

这为您提供了两全其美的好处——一个强大的基本 MSI 包,您可以完全控制它(因为它不是由重新打包程序自动生成的),而且还可以节省时间,因为您不必从头开始重新实现 InstallScript 函数。

I wouldn't recommend the repackager solution for the same reasons Christopher mentions.

A good bridge between your InstallScript project and new Basic MSI project would be to create a new Basic MSI project which uses InstallScript custom actions. With this approach, the MSI engine will manage the non-proprietary aspects of your install, and the legacy InstallScript code can be reused to manage the proprietary aspects of your install.

This gives you the best of both worlds -- a robust Basic MSI package which you have complete contol over (since it wasn't autogenerated by a repackager) PLUS time savings since you don't have to reimplement your InstallScript functions from scratch.

远山浅 2024-10-27 02:41:46

重新打包程序最多只能捕获安装的业务规则的一个实例。您不能简单地“转换”您的安装,而是重新设计它。理想情况下,您应该让 MSI 专家审查您的 InstallScript 项目,并确定可以通过重构 MSI 最佳实践来消除的部分,然后重写剩余部分以适合 MSI 的序列表。

如果您的旧卸载表现良好,您可以编写一个自定义操作来删除它。如果您的新产品进入新的安装目录,这是最简单的,因为您消除了潜在的文件成本问题。如果这是不可能的和/或您的旧安装没有正常卸载,那么这将变得更加复杂。

如果您希望将配置数据从旧安装上下文保留到新上下文,则情况也可能会更加复杂。

多年来我已经做了很多这样的事情,虽然这可能非常具有挑战性,但也可能是有益的,因为你一路上清理了很多污垢。

A repackager at best can only capture one instance of the business rules of an install. You can't simply 'convert' your install but rather you redesign it. Ideally you would have an MSI expert review your InstallScript project and identify the pieces that can be eliminated through refactoring to MSI best practices and then rewrite the remaining portions to fit MSI's sequence tables.

If your old uninstall behaves nicely you can write a custom action that removes it. This is easiest if your new product goes to a new installation directory as you eliminate potential file costing issues. If this is not possible and/or your old install doesn't have a properly behaving uninstall then this will become more complicated.

It can also be more complicated if you have configuration data that you want persisted from the old installation context to the new context.

I've done many of these over the years and while it can be very challenging it can also be rewarding as you get to clean up a lot of crud along the way.

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