且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使安装程序自动为应用程序安装所有必备程序

更新时间:2022-12-29 23:28:56

像PhilDW所说的那样,您可以使用许多具有所需功能的工具。以下是其中一些优点和缺点的简短摘要: 要使用什么安装产品? InstallShield,WiX,Wise,Advanced Installer等 。如果您想满足先决条件,那么使用上面链接中描述的工具之一将节省大量时间。使用 Microsoft Visual Studio 2015安装程序项目类型可能会失败。它的功能集非常有限。

Like PhilDW says there are many tools with the features you request. Here is a short summary of the pros and cons of a few of them: What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc. If you want to deal well with pre-requisites you would save a lot of time if you use one of the tools described in the link above. Using the "Microsoft Visual Studio 2015 Installer Project" type will likely fail. It has a very limited feature set.

WiX 免费开源 ,并包含一个称为刻录的引导程序功能。我最近没有使用过它,并且不确定使用的方式如何,但是这里是以下文档:> 方法:使用刻录功能安装.NET Framework (首先阅读步骤1中的构建安装软件包捆绑包说明) 。

WiX is free and open source, and contains a bootstrapper feature called "Burn". I have not used it recently, and I am not sure how "involved" it is to use, but here is the documentation for: How To: Install the .NET Framework Using Burn (first read the "Building Installation Package Bundles" instructions in "Step 1").

我没有使用过,但是一些开发人员推荐 dotnetinstaller引导程序 。对此一无所知,这可能是更简单的选择。

I have not used it, but several developers recommend the dotnetinstaller bootstrapper. Without knowing much about it, this is probably the easier option. Maybe give it a test spin.

您应该知道,这些天很多Microsoft必备软件都应该通过Windows Update来解决,而不是通过Windows Update重新分发。每种设置-尤其是.NET运行时。此运行时会增加安装程序的大小(尤其是很小的情况)。您可以在下载页面(如果有的话)上将其作为单独的下载提供,或者在退出启动条件后退出安装程序后,仅告诉用户通过Windows Update安装它。

You should be aware that a lot of Microsoft pre-requisites should come down via Windows Update these days, rather than be re-distributed by each setup - particularly the .NET runtime. This runtime adds a lot to the size of your installer (especially if it is small). You could offer it as a separate download on your download page (if you have one), or just tell the user to install it via Windows Update after exiting your setup with a launch condition.

也许还会检查以下答案:

Perhaps also check these answers:

  • WiX - Install Prerequisites and 3rd party applications
  • How to include prerequisites with msi/Setup.exe in WIX

更新:以下是答案,其中包含更多有关如何使用刻录的示例的链接: Wix-如何在没有UI的情况下运行/安装应用程序(指向底部-指向Fredriksen项目的github链接)。

UPDATE: Here is an answer with links to more samples on how to use Burn: Wix - How to run/install application without UI (towards the bottom - the github link to Fredriksen's project).