Why do so many programs have both a setup.exe and a setup.msi?

DeploymentInstallation

Deployment Problem Overview


I have always wondered about this. So many application setups have a zip file that you unzip, and in it are a bunch of files, among other things an exe and an msi. What is the difference? They are often even about the same size. I am never really sure which one to execute, sometimes I do the exe and sometimes the msi, and it usually works with either one. But does one of them do anything that the other doesn't do? And if not, isn't it kind of a waste having two files that does the same thing? Especially when thinking about download size, etc...

Not sure if this should be here or on ServerFault, or maybe neither, but I figured since developers usually are the ones creating setup files, then developers might know why this is like it is =)

Deployment Solutions


Solution 1 - Deployment

In the case where you have both exe and the msi the exe is just a loader for the msi. If you have an installation supporting multiple languages then the exe applies a language transform (mst) on the msi before installing.

You can consider the exe as a wrapper around the msi. The msi file may or may not be given separately. The reason why people give the msi file too is to facilitate a group policy installation (in a Windows Active Directory infrastructure) as you can only push down installations of msi files and not exes.

Solution 2 - Deployment

The setup.exe is a wrapper for the MSI, but it is not only a wrapper.

  • The setup.exe can rely on a setup.ini to define parameters
  • The setup.exe checks for the Windows Installer (a MSI cannot be installed otherwise)
  • The setup.exe can check for frameworks, like the .NET framework. The developer can pick one of those defined in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages (for Visual Studio 2008). If it is lacking, it will try to download it from http://www.microsoft.com/
  • The setup.exe can be reconfigured with msistuff.exe

Solution 3 - Deployment

The actual installation is done in the MSI. As Prashast said, the exe is just a wrapper, but the reason for having the exe, is that an exe is allways possible to run. If the user do not have MS Installer installed on the computer, or his version of MS Installer is older than the version required by your installation, then the MSI file is not possible to run.

The exe provides automatic installation of MS Installer (including some question to the user if he/she wants to do this) before running the MSI file. In most cases, the install packages needed for Microsoft Installer is included inside the setup.exe, or sometimes it is just the prerequisites check with a link to download the installation from Microsoft.

Solution 4 - Deployment

In very basic words,

you can deliver just the .msi file and it will install. but .exe will not work without the .msi

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSvishView Question on Stackoverflow
Solution 1 - DeploymentPrashastView Answer on Stackoverflow
Solution 2 - DeploymentrdsView Answer on Stackoverflow
Solution 3 - DeploymentaweView Answer on Stackoverflow
Solution 4 - DeploymentJoshView Answer on Stackoverflow