拥有 MSI 安装包的主要优势是什么?
我以为这会在网络上的某个地方,但我无法谷歌它:
考虑到创建 MSI 包的复杂性(与 NSIS、InnoSetup 等相比),什么是一个令人信服的理由去经历所有这些混乱(使用 MSVS 蹩脚的安装项目向导,学习全新的语言/生态系统只是为了制作安装程序(WiX),或者支付高昂的许可证费用(InstallShield))为了制作 MSI 安装程序?
除了明显的 MSDN 页面,例如:)
I thought this would be somewhere on the Web, but I couldn't Google it:
Given the complexity involved in creating an MSI package (compared to NSIS, InnoSetup, etc.), what would be a compelling reason to go through all the mess (using MSVS's crappy setup project wizard, learn a whole new langauge/ecosystem just to make the installer (WiX), or pay heavy license fees (InstallShield)) for the sake of making an MSI installer?
Would be nice to have real world opinions or experience (even to prove that MSI is really worthless) other than the obvious MSDN page, for instance :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我不认为在所有情况下都存在一个主要优势。与其他类型的安装程序相比,我喜欢它的一些特点:
安装逻辑和代码包含在数据库中,该数据库采用可访问的格式。
当我调试时我非常喜欢这个。您可以使用 Orca(从 MS 免费下载数据库编辑工具)等工具直接编辑数据库,而不是重建安装程序,然后再次运行安装来测试您的更改。更新您的自定义代码、临时调节某些内容、更改操作顺序,无论您需要做什么。
正在修补。安装程序服务及其相应工具知道如何创建包含更新文件增量而不是完整文件的补丁。它允许维护规模保持合理。
行政图像。安装程序可以创建管理映像。如果您已生成补丁,则可以将补丁应用到管理映像,然后可以从管理映像而不是原始安装程序运行新安装。就像操作系统映像中的滑流补丁一样。如果您要将应用程序推送到大量计算机,那么不需要在安装后推送大量补丁,这非常酷。
其他有趣的功能包括转换、从源代码运行、检测和修复、组件共享等。
I don't think there is one prime advantage for all situations. Here are some things I like about it, vs other kinds of installers:
Install logic and code is contained in a database, which is in an accessible format.
I like this a lot when I'm debugging. Rather than rebuilding your installer, you can directly edit the database with a tool like Orca (free database editing download from MS), then run the install again to test your changes. Update your custom code, temporarily condition something out, change the order of operations, whatever you need to do.
Patching. The Installer service and its corresponding tools know how to create patches containing deltas of updated files, rather than complete files. It allows maintenance sizes to remain reasonable.
Administrative Images. The installer can create an administrative image. If you've generated patches, you can apply the patches to the administrative image, and new installations can then be run from the administrative image rather than the original installer. Like slipstreaming patches in OS images. If you're pushing your app out to a large number of machines, it's pretty cool to not need to push a bunch of patches out post-install.
Other interesting features include transforms, run from source, detect and repair, component sharing, and so on.
看看这个:
https://serverfault.com/questions/11670/advantages-of-使用 msi 文件
Take a look at this:
https://serverfault.com/questions/11670/advantages-of-using-msi-files
我非常确定有些企业需要 MSI 格式才能在数千台计算机上远程批量安装应用程序。不过我不与此类组织打交道,所以不确定。
I'm pretty certain that there are enterprises that require MSI formats to remote bulk install an application on thousands of machines. However I don't deal with such organizations so don't know for certain.
需要MSI(或ClickOnce)才能获得Windows Vista Logo Program(微软官方认证)。我相信 Windows 7 中删除了此要求,但通过 MSI 获得认证仍然更容易(请参阅 此处)。
不过,您不需要购买任何昂贵的第三方安装程序包。如果您打算使用 MSI,我建议您使用 WIX 并学习它。一旦你熟悉了它,它就会运作得很好。
MSI (or ClickOnce) was required to obtain the Windows Vista Logo Program (Microsoft official certification). I believe this requirement was removed with Windows 7, but it's still easier to get certification with MSI (see here).
You don't need to buy any expensive 3rd party installer package though. If you're going for MSI, I suggest you use WIX and learn it. Once you're familiar with it, it works pretty well.
另一本不错的读物是:
Windows Installer:系统管理员的优势和实施
担任全职设置开发人员已经 14 年了。我的前 7 年是 InstallScript Setup.exe 风格的项目,而我的最后 7 年是基于 MSI 的。起初我抵制 MSI,但使用 6 个月后,我真正相信它有多么好。
Another good read is:
Windows Installer: Benefits and Implementation for System Administrators
I've been a full time setup developer for 14 years. My first 7 years were InstallScript Setup.exe style projects and my last 7 years have been MSI based. At first I resisted MSI and then after 6 months of using it I became a true believer in how much better it is.