提高 Wix msi 安装/卸载的性能

发布于 2024-08-23 07:03:59 字数 556 浏览 1 评论 0原文

在Windows 7(即MSI 5.0)中,有一个名为 MSIFASTINSTALL 这将提高安装程序的性能。或者,您可以通过设置属性 DISABLEROLLBACK 来关闭回滚选项。此属性在早期版本的 MSI 5.0 中也可用。

请分享您的知识以改善安装体验。另外,我找不到提高卸载性能的正确方法。我们使用大量文件/文件夹(超过 70,000 个)和 35000 个组件。它挂在文件成本计算过程中,并且不知道如何避免这种延迟。有时它会挂起超过 2 或 3 小时才能在 XP 或 Vista 计算机中卸载

编辑: 正如克里斯托弗所说,我通过压缩具有巨大文件集的文件夹并减小了组件大小来对安装进行了一些修改。它极大地提高了性能。是的,当然,我通过执行此概念丢失了 MSI 安装程序模式,并且不推荐使用这种方法。然而,当我们想要实现这一点并且我们的用户在卸载/升级补丁时确实不希望获得文件版本详细信息时,这是一种权衡。

In Windows 7(i.e. MSI 5.0), there is a property called MSIFASTINSTALL which will improve the performance of your installer. Or else, you can turn off the rollback option by setting property DISABLEROLLBACK. This property is available in earlier version of MSI 5.0 too.

Please share your knowledge to improve the install experience. Also, I cannot find the right way to improve the performance of Uninstall. We use huge set of files/folders (more than 70,000) and components like 35000. It hangs in the file costing process and do not know how to avoid this delay. Sometime it hangs for more than 2 or 3 hours to uninstall in XP or Vista machines

Edit:
I did some hack in my install by zipping the folders which has huge file sets and reduced the components size like Christopher said. It improved the performance drastically. yes ofcourse, I lost the MSI installer pattern by doing this concept and it is not recommended approach. However, it is trade off when we want to achieve this and our user really do not want to have file version details when we uninstall/upgrade the patches.

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

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

发布评论

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

评论(2

别把无礼当个性 2024-08-30 07:03:59

我也遇到过类似的情况,不过文件数量少了一点,大约25k。这些文件大部分都是图标,从一个版本到另一个版本从未改变过。只有主要版本(每两年一次)可能会给该领域带来一些变化。一个“快速而肮脏”的解决方案是压缩这些图标并将这个单个文件包含到安装中(不是组件,只是与 MSI 并排的文件)。在安装过程中,该 ZIP 在后台线程中提取,RemoveFile 表用于在卸载时删除图标。它比将这 20k 图标安装为单独的组件(即使是包含许多文件的组件)要快。一个好的、正确的解决方案是说服主要应用程序开发人员将所有这些 20k 图标放入 20 个 zip 存档中。现在,这 20 个 zip 文件作为常规 MSI 组件安装,并且应用程序知道如何按需提取图标并缓存它。

我不建议您禁用回滚。尽管您将节省相当多的安装时间,但您会失去标准的有保证的回滚选项。

由于再次回滚功能,卸载比安装需要更多时间。据我了解,当您卸载时,MSI 首先创建每个文件的副本,然后卸载每个文件,如果成功,则删除每个备份文件。因此,卸载时间大约是安装时间的三倍。当我采用默认选项每个组件有 1 个文件时,我遇到了同样的问题。尽管建议这样做,但如果您处理的是未决案件,则应该做出权衡。

希望这能为您解决一些问题。

I had a similar situation, though the number of files was a bit less, about 25k. Most of those files were icons, which were never changed from one release to another. Only a major release (once per 2 years) might bring some changes to this area. A "quick & dirty" solution was zipping those icons and include this single file into the installation (not a component, just a file side by side with the MSI). During the installation this ZIP was extracted in the background thread, and RemoveFile table was used to delete icons on uninstall. It was faster than installing those 20k icons as separate components, even as components with many files. A good and correct solution was to convince the main application developers to put all those 20k icons into the 20 zip archives. Now these 20 zip files are installed as regular MSI components, and the application knows how to extract an icon on demand and cache it.

I would not recommend you to disable rollback. Though you'll save quite some installation time, you lose a standard guaranteed rollback option.

Uninstall takes more time than install because of rollback feature again. The way I understand it, when you uninstall, the MSI firstly creates a copy of every single file, then uninstalls every single file, and in case of success, drops every single backed up file. Hence, the uninstall time is about three times as much as the install time. I experienced the same problem when I took a default option to have 1 file per component. Though it is recommended, you should make a trade-off if you deal with an outstanding case.

Hope this clears up the things for you a bit.

余厌 2024-08-30 07:03:59

提高应用程序性能的最佳选择是减少文件和组件的数量。虽然您可以对 MSI 进行一些调整来提高性能,但文件/组件数量过多是核心问题,并且将成为您进行的任何性能改进的限制因素。为什么需要安装70k的文件?

The best option for improving the performance of your app is to reduce the number of files and components. While there may be a couple tweaks you can do to your MSI to improve the performance, the excessive number of files/components is the core issue and will be the gating factor on any performance improvements you make. Why do you need to install 70k files?

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