How to merge Setup.exe, Setup.msi and .NetFramework prerequisite in a single installer?

一世执手 提交于 2019-12-02 00:38:50

Make use of the NSIS installer - you may find it here, there's tutorials to be a plenty from here. Here's an example of the syntax adopted to your usage scenario:

(...)
SetOutPath "$INSTDIR\resources"
SetOverwrite off
File "setup.exe"
File "setup1.msi"
File "DotNetFX40Client/dotNetFx40_Client_x86_x64.exe"
(...)
Exec "$INSTDIR\resources\setup.exe"

The NSI file is then compiled into a single file installer that includes all your material in one exe - the functionality of that exe file can be anywhere in between simply unpackaging and executing your own setup.exe file and a full custom installer (can't see why you would want that in your case).

I have had a good bit of success using dotNetInstaller 1.10 as a post-build step (the original installer, [optional] MSI, and any support bundles are wrapped into the dotNetInstaller output executable):

dotNetInstaller enables the developer to define the application prerequisites and install the correct version(s) of these components in a predictable order based on the processor architecture, user operating system type and language, allow the user to download these components from the web, install these components directly from a single packaged setup, local media or both. dotNetInstaller is very feature rich and runs on all known Windows operating systems with a very tiny footprint.

A boostrapper [dotNetInstaller] doesn't replace tools like InstallShield, Wise, Visual Studio Setup and Deployment Project or Wix. The goal is to create an application to help users with installing the correct prerequisites. Most real world applications need to install several components to work properly, including Windows Service Packs, Internet Explorer, MDAC or .NET Framework. This kind of applications are most commonly known as bootstrappers. dotNetInstaller is such a bootstrapper.

It takes some work to get the "rules correct", but it Works Well Enough for Me.

Happy coding.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!