windows 如何在另一个安装程序中创建安装程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/847150/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to create installer inside another installer?
提问by George2
I want to create a Windows Installer, the 1st step I want it to call another installer (will install dependent components of my application), and the 2nd step I want to install my own application. I want to do all tasks in one installation process, and I have the dependent component installation package at hand (an exe file).
我想创建一个 Windows 安装程序,第一步我希望它调用另一个安装程序(将安装我的应用程序的依赖组件),第二步我想安装我自己的应用程序。我想在一个安装过程中完成所有任务,并且我手头有依赖组件安装包(一个exe文件)。
Any good tools or samples to refer to? I prefer to use VSTS or Microsoft or open source easy to use tools. :-)
有什么好的工具或示例可以参考吗?我更喜欢使用 VSTS 或 Microsoft 或开源的易于使用的工具。:-)
thanks in advance, George
提前致谢,乔治
回答by saschabeaumont
You might want to take a look at the Microsoft Bootstrapper, assuming the dependent components are libraries such as .NET or similar then it's fairly straightforward.
您可能想看看Microsoft Bootstrapper,假设依赖组件是 .NET 或类似的库,那么它相当简单。
If you want to create a Windows Installer(MSI) package then take a look at Windows Installer XML(WiX). But you'll want to get your head around how MSI worksfirst. WiX is really simple once you understand Windows Installer, but trying to learn both at once can be rather confusing.
如果要创建Windows Installer(MSI) 程序包,请查看Windows Installer XML(WiX)。但是您首先要了解 MSI 的工作原理。一旦您了解了 Windows Installer,WiX 就非常简单,但是尝试同时学习两者可能会相当混乱。
For a basic, copy some files, extract/run some stuff, type installer then NSISis fairly straightforward scripting and you can pick that up in a day or so.
对于基本的,复制一些文件,提取/运行一些东西,输入 installer 然后NSIS是相当简单的脚本,你可以在一天左右的时间内完成。
回答by Philippe Carriere
Nsis with this modification.
Nsis 与此修改。
回答by Dirk Vollmar
Update: It seems that nesting MSI installation is somewhat possible. However it requires some tweaking using tools from the Windows Installer SDK and has a number of drawbacks.
更新:似乎嵌套 MSI 安装在某种程度上是可能的。但是,它需要使用 Windows Installer SDK 中的工具进行一些调整,并且有许多缺点。
The following article has the details:
以下文章有详细信息:
Microsoft recommends not to use this feature (see this related answerand point 20 in this list).
Microsoft 建议不要使用此功能(请参阅此相关答案和此列表中的第 20 点)。
However, you might also want to look at different install systems such as NSIS or create a bootstrapper that installs the dependencies prior to setup.
但是,您可能还想查看不同的安装系统,例如 NSIS 或创建一个引导程序,在安装之前安装依赖项。
回答by dommer
You could look at Inno Setup. It creates exe installers, as opposed to MSIs. It has a pascal-based scripting language, so is pretty flexible.
你可以看看Inno Setup。它创建 exe 安装程序,而不是 MSI。它具有基于 pascal 的脚本语言,因此非常灵活。
It's free and pretty easy to use.
它是免费的并且非常易于使用。
If your existing installer doesn't use the MSI technology, you could use WiXto create an MSI and launch the existing installer via a custom action. I've done this in the past.
如果您现有的安装程序不使用 MSI 技术,您可以使用WiX创建 MSI 并通过自定义操作启动现有安装程序。我过去做过这件事。
WiX is open source.
WiX 是开源的。
回答by Gaurav Sharma
yes it would be very easy if you do it using Inno Setup, but with a slight difference..
是的,如果您使用 Inno Setup 进行操作会非常容易,但略有不同。
You will have to perform step 2 first and then step 1.
您必须先执行第 2 步,然后再执行第 1 步。
Try using AutoHotkey(scripting) for checking the existence of any process in the background that verifies the installation of a particular software.
尝试使用 AutoHotkey(脚本)来检查后台是否存在任何验证特定软件安装的进程。
回答by Copas
Check out iexpress on windows systems. In just a few minutes you can create an installer that can call as many installers as you like.
在 Windows 系统上查看 iexpress。只需几分钟,您就可以创建一个可以调用任意数量的安装程序的安装程序。