Is there any way to compile the Nullsoft Installer Script (NSI) setup as a MSI package instead of an EXE?
Unfortunately, No.
NSIS lets you create scriptable, procedural installation packages. It's simple, easy to use and has a number of features not present in Windows Installer.
Windows Installer (MSI) creates database driven, transactional installation packages. When written properly a Windows Installer package is very robust, a file gets corrupted/deleted and it will be automatically reinstalled. Windows Installer is aware of UAC and only elevates when required, basically if you're creating software for the corporate market, you will need to provide an MSI.
Check out The Definitive Guide to Windows Installer for a good introduction to understanding MSI.
NSIS installers can be wrapped in MSI files using the MSI Wrapper. It is a small tool that I made for wrapping NSIS and Inno Setup installers. It uses WiX to compile the MSI but there is a GUI to help you instead of an XML file.
It was made because I needed a tool for creating MSI files based on traditional EXE installers. I needed support for uninstall and upgrades and only wanted the wrapped installers to show up once in the Add/Remove programs in the control panel.
I also wanted to be able to pass command line parameters to the wrapped installer when the MSI is installed.
If you want to use it or help me improve it, you can find it at http://www.exemsi.com.
I share the opinion that wrapping an executable installer in an MSI package is not the ideal solution. However, when you already have the exe it can make a lot of sense :-)
No (And there are no plans to support .MSI output), try WIX
Related
Just wondering how an installer such as a setup.exe contains the files it's supposed to install, when it's an offline installer. I get that I can create a msi or a setup.exe easily in Visual Studio, but what if I, for example, would want to write an installer with a custom gui with raw c++ (if possible)? How does a singular executable contain all the necessary files (such as the dll's)?
As Ken said, Windows Installer is a complex service. If you are into learning about it here are some resources:
Intro for Windows Installer:
https://learn.microsoft.com/en-us/windows/win32/msi/windows-installer-portal
How files are bundled inside an MSI:
https://learn.microsoft.com/en-us/windows/win32/msi/using-cabinets-and-compressed-sources
If you just want to build a native MSI use existing tools, there are plenty of options free or paid.
Is it correct msi file is the Windows equivalence of deb file in Debian?
In Debian/Ubuntu, after I compile a program into an executable, I can create a deb file out of the executable using a program called checkinstall. Then I can install a deb file by dpkg.
In Windows,
what is the program/command that can create a msi file from an executable built from source code?
What is the program/command that can install a msi file?
Thanks.
The Windows Installer consists of an SDK, database specification and runtime service. Introduced in 1999, it originally had redistributables that were nesseccary to "bootstrap" onto the system before and MSI could be installed. Various versions of this runtime have been been baked into various versions of Windows for a very long time now so generally this is no longer a concern. You can simply install the MSI.
Technically the SDK does come with some tools that could be used to create an MSI. However this would be like using notepad and CSC to write a .NET app. Almost no one would actually do it this way. One notable tool does come from the SDK: ORCA.exe. ORCA is a database editor which is very useful for examining MSIs and making minor modifications to already built MSI. It technically can be used to create an MSI but very few outside of Microsoft back in the early days ever did.
For the most part Microsoft left installer authoring tools to third parties. Windows Installer XML (open source), Industrial Strength Windows Installer XML (open source), InstallShield, Visual Studio Deployment Projects, InstallAware and AdavancedInstaller are a few to list. It is outside of the scope of Stack Overflow but I will link a 2 minute video showing how to use Visual Studio, WiX and IsWiX to create a simple MSI with a shortcut for a single EXE:
https://www.youtube.com/watch?v=nnV_OU6fk8c
Disclosure: I'm the project maintainer for the IsWiX on GitHub.
As for how to install an MSI. An MSI is a database not a program. It is installed by the Windows Installer service msiexec.exe
There is an extensive command line documented at:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa367988(v=vs.85).aspx
There is no standard tool for creating MSI installer files. There are many, many third-party tools, free and paid, that will help you to create MSIs; you'll have to do some searching and comparing and figure out what works best for you. The command to install an MSI is the MSI itself, you don't need to explicitly run it with any other program like you do with deb/rpm packages.
My problem is the following:
I have multiple applications that I want pack in one installer so when the user runs it, they will be installed automatically instead of installing or copying each single application.
I have a program that's already a setup file (.exe) and two .exe files which can be executed manually and do not need an installation. So what I want is:
Build an installer so when the user opens it - the .exe file of the setup program gets installed and the other applications which dont need to be installed will be copied somewhere in a path.
Whats the best solution?
I think you need a packaging programs to create an installation package, such as:
AdvancedInstaller
InstallShield
InstallAnyware
The first two of them have a freeware version. Maybe you can see if the required features are available in the freeware version.
I would suggest Advanced Installer (allows easy chaining of installs) if you have no significant deployment experience. Otherwise I would suggest Wix and its "Burn" feature (ability to chain installers in sequence). Please read the following answers for context:
What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc
Windows Installer and the creation of WiX
Wix to Install multiple Applications
Read this if you want to get going with Wix quickly
I'm trying to put together an installer package that will install VS2010, SQL Server 2008 R2, and some other development tools into a single executable installer. The idea is to create something similar to XAMPP's installer that installs Apache, PHP, Perl, and MySQL in one convenient installer.
The installers for almost every program are .msi files. Are there any applications that can 'package' all the installers into a single executable? Barring that, what other solutions are there out there to perform something like this? I've looked into using a batch file with the /passive switch for each .msi so it does an unattended install, but I'd like to make it look like a GUI application if at all possible.
Many commercial setup authoring tools offer more or less support for this. You basically create an EXE or MSI installer which acts as a wrapper for existing third-party packages.
Usually these packages are added as prerequisites, but they can also be executed through custom actions.
You can find a list of setup tools here:
http://en.wikipedia.org/wiki/List_of_installation_software
Another solution is to create your own EXE wrapper which shows custom UI and handles the third-party packages.
I'm evaluating a number of windows installer tools for our application. Some of them will create .MSI files, but some of them only create .EXEs.
I'm all for keeping up with the times, but should I make it a requirement of the app I choose that it be able to create a .MSI file? Is there any reason to require that over a simple installer .EXE?
Our software isn't intended for corporate deployment, so we don't need an MSI for that (for unattended installs etc). But if we're going to skip the MSI, I want to know what advantages I'd be missing out on.
Take a look at that other thread here: What's the prime advantage to having an MSI installation package?
If you really don't care about MSI features like unattended install or administrative install you can skip MSI. On the other hand skipping MSI doesn't seem to provide any advantage. Just use the installer tool you prefer.
Use Inno Setup :-)
I've experienced unresolvable dependency issues with msi installers in the past.