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

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

问题描述

我需要为我的应用程序创建一个安装程序来安装我的应用程序,如果用户的计算机没有运行我的应用程序所需的必备程序,它将自动启动安装程序.例如,如果用户没有所需版本的 .Net Framework,它将自动运行所需版本的设置.如果用户没有 SQL Server Compact,它将为其运行安装程序.如果用户确实有必备设置,则不会执行必备程序的设置.我正在尝试使用 Microsoft Visual Studio 2015 Installer Project 并浏览 Launch Conditions 因为我有一种直觉,这将使它工作,但我找不到一个好的教程如何使这成为可能.提前谢谢!

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、高级安装程序等.如果您想很好地处理先决条件,如果您使用上面链接中描述的工具之一,您将节省大量时间.使用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免费开源,并包含一个名为Burn"的引导程序功能.我最近没有使用它,我不确定它是如何参与"使用的,但这里是文档:如何:使用 Burn 安装 .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 bootstrapper.在不了解的情况下,这可能是更简单的选择.不妨试一试.

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 更新来实现,而不是由每个设置重新分发 - 特别是 .NET 运行时.此运行时会大大增加安装程序的大小(尤其是在很小的情况下).您可以在下载页面上将其作为单独的下载(如果有)提供,或者只是告诉用户在使用启动条件退出设置后通过 Windows 更新安装它.

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:

更新:这是一个答案,其中包含有关如何使用 Burn 的更多示例的链接: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天全站免登陆