如何使安装程序自动为应用程序安装所有必备程序 [英] How to make an installer that automatically install all the prerequisite programs for the application

查看:101
本文介绍了如何使安装程序自动为应用程序安装所有必备程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为我的应用程序创建一个安装程序以安装我的应用程序,如果用户计算机没有运行我的应用程序所需的必备程序,它将自动启动该程序的安装程序。例如,如果用户没有所需的 .Net Framework 版本,它将自动运行所需版本的安装程序。如果用户没有 SQL Server Compact ,它将为其运行安装程序。如果用户确实具有必要的设置,则不会执行必要程序的设置。我正在尝试使用 Microsoft Visual Studio 2015安装程序项目,并浏览启动条件,因为我有直觉,这会使它起作用,但是我找不到好的教程,如何做到这一点。预先谢谢您!

I need to create an installer for my application that install my application and if the user's computer doesn't have the pre requisite programs that needs to run my application, it will automatically launch the setup for that. Like, if the user doesn't have the required version of .Net Framework, it will automatically runs the setup for the required version. If the user doesn't have SQL Server Compact, it will run the setup for it. If the user do have the pre requisite setup, it won't execute the setup for the pre requisite programs. I'm trying to use the Microsoft Visual Studio 2015 Installer Project and browsing the Launch Conditions because I have a intuition this will make it works but I can't find a good tutorial how to make this possible. Thank you in advance!

推荐答案

像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

更新:以下是答案,其中包含更多有关如何使用刻录的示例的链接:< a href = https://stackoverflow.com/questions/48148875/wix-how-to-run-install-application-without-ui/48157650#48157650> 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).

这篇关于如何使安装程序自动为应用程序安装所有必备程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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