改善Wix MSI安装/卸载的性能 [英] Improving performance of Wix msi install/uninstall

查看:75
本文介绍了改善Wix MSI安装/卸载的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

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

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

修改: 我在安装过程中做了一些黑客工作,方法是压缩包含巨大文件集的文件夹,并缩小组件的大小,就像Christopher所说的那样.它极大地提高了性能.是的,当然,通过执行此概念,我丢失了MSI安装程序模式,因此不建议这样做.但是,当我们要实现这一目标时,这是折衷的选择,而当我们卸载/升级补丁程序时,我们的用户确实不希望拥有文件版本的详细信息.

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.

推荐答案

我遇到了类似的情况,尽管文件数量少了一点,约25k.这些文件大多数是图标,从未从一个发行版更改为另一个发行版.只有一个主要版本(每2年一次)可能会对该区域进行一些更改.一种快速且肮脏的"解决方案将这些图标压缩并包括在安装中(而不是组件,只是与MSI并排的文件)该单个文件.在安装过程中,此ZIP文件被提取到后台线程中,并且RemoveFile表用于在卸载时删除图标.这比将这20k图标安装为单独的组件甚至包含多个文件的组件要快.一个好的且正确的解决方案是说服主要应用程序开发人员将所有这20k图标放入20个zip存档中.现在,这20个zip文件已作为常规MSI组件安装,应用程序知道如何按需提取图标并将其缓存.

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.

由于再次具有回滚功能,卸载所花费的时间比安装所花费的时间更多.以我的理解,在卸载时,MSI首先会创建每个单个文件的副本,然后卸载每个单个文件,如果成功,则会删除每个备份的文件.因此,卸载时间约为安装时间的三倍.当我采用默认选项以使每个组件具有1个文件时,我遇到了相同的问题.尽管建议这样做,但如果要处理未决案件,则应进行权衡.

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.

这篇关于改善Wix MSI安装/卸载的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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