Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
948 views
in Technique[技术] by (71.8m points)

.net - How to make an installer that automatically install all the prerequisite programs for the application

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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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 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").

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.

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:


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).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...