安装期间运行 MSI
我正在寻找一个 .net 应用程序的安装程序,它需要运行一些其他 MSI。由于一次只能运行一个 MSI 的限制(老实说,是 1995 年吗?),并且我希望提供要运行的 MSI 的可配置性,因此我不能像推荐的那样将 MSI 放入引导程序中实践。我发现了一个类似的问题,但对回复并不满意。
作为替代方案,是否有一个基于 .net 的安装程序框架可用于自定义安装过程?我熟悉 IzPack、InstallJammer 和 NSIS 但所有这些都使用非 .net 语言,并且如果 .net 商店有点害怕其他技术,则可以使用此方法。
I am looking to make an installer for a .net application which requires a few other MSI be run. Because of the restriction that you can only run one MSI at a time(honestly, is it 1995?) and my desire to provide configurability of which MSIs to run I can't just shove the MSIs in a bootstrapper as seems to be the recommend practice. I found a similar question but no joy on the response.
As an alternative is there a .net based installer framework which could be used to customize the install process? I am familiar with IzPack, InstallJammer and NSIS but all of these use non-.net languages and this if for a .net shop who are a bit scared of other technologies.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您可以使用他们的 UI 或简单地使用 WiX 风格的 UI,WiX 可以解决这个问题。
如果你想要更丰富的 UI 体验,你需要编写一个自定义引导程序。我过去通过编写一个客户引导程序解决了这个问题,该引导程序向用户提供了统一的 UI,并使安装看起来像单个包,而实际上安装是按顺序运行的 MSI 文件的集合。
以下是我所做工作的总体要点:
细节决定成败,但它确实有效,而且效果很好!
编辑 2010 年 9 月 3 日添加更多注释:
如果您采用这种方法,需要考虑以下一些事项:
基本上,在创作安装时(无论是单个MSI 或复合套件安装)确保您布局整个软件生命周期的所有用例。很容易以短视的方式编写安装程序,然后在 v2 发布时发现自己陷入了一个不愉快的困境。
祝你好运 ;)
WiX solves this problem if you're okay using their UI or doing simply WiX-style UI.
if you want a richer UI experience you need to write a custom bootstrapper. I have solved this problem in the past by writing a customer bootstrapper which presented a unified UI to the user and made the install look like a single package where in reality the install was a collection of MSI files that were run in sequence.
Here's the general gist of what I did:
The devil's in the details, but it worked and it worked well!
Edit 9/3/2010 with more notes:
Here are some things to consider if you take this approach:
Basically, when authoring installs (whether single MSI or composite suite install) make sure you lay out ALL of your use-cases for the entire software lifecycle. It's very easy to write an installer in a shortsighted manner and then find yourself painted into an unpleasant corner when v2 comes out.
Good luck ;)
我使用 WiX 创建 MSI,然后用一个非常小的 NSIS 脚本将它们打包到 .exe 中。我与微软的项目进行过交谈,他们自己也经常使用它。如果您发现 XML 令人畏惧,可以使用一些工具来帮助您使用它。
即使您坚持按照自己的方式制作 MSI,我仍然会推荐使用 NSIS 来生成 .exe。脚本通常非常小。
I use WiX to create the MSI, and then package them into .exe with a very small NSIS script. I've talked to projects at Microsoft, and they use it themselves a lot. There are tools out there that help you use it if you find the XML daunting.
Even if you stick to making the MSI's the way you do, I would still recommend NSIS for the .exe. The scripts are usually pretty tiny.