Should you run MSI or EXE Setup files?
Some software programs are unpacked to both an msi and an exe setup file. If you are an end user you may wonder which -- or both? -- to execute to install the application properly.
Chance is that you tried both ways at least once and noticed that clicking the msi or the exe setup file will both install the application properly. The setup.exe that you encounter in lots of software distributions is called a bootstrapper.
This setup.exe file will check if the computer system is capable of running the software program; If it is, it will initiate msiexec.exe which will launch the installation using the msi file.
Users who double-click on the msi file directly will also install the application but with the possibility that it will not run properly on the computer system.
Should you run MSI or EXE Setup files?
Take a computer program that requires the Microsoft .net Framework 3.5 for example. If that version of the Framework is not installed on the system, you may end up with a program that is not working properly on the PC due to the missing dependency. If you would have launched the setup.exe file instead, the program would have informed you about it, or installed the missing dependency directly on your computer so that the installed program would work just fine on it afterwards.
If you install the program using the msi file the installation will usually go through without issues either, but in the end, you may run into problems from applications that just wont start up at all to crashes or warning messages.
Rule of thumb: Unless you know what you are doing, it is recommended to use the setup.exe file whenever you have the choice between a setup.exe or an .msi file after you unpack a software installer on your system.
There are even some msi setup files out there that will not perform the installation upon execution but request an installation using the setup.exe file instead to ensure that all necessary components are installed.
Files with the msi or msp extension are Windows Installer Package files. You can read up on those files on Wikipedia if you are interested in finding out more about their capabilities.
I’m confused that does msi and exe contain the actual program or application to play with, or are these just installers to install the applications.
I love simple explanations.
Thanking you everso.
Hi Martin,
I would like to add to Kurt’s comment that the MSI can (and should) also check for missing DLL’s and other requirements. You can even execute custom actions such as shell commands to install dependencies.
thanks
Hi Martin.
I believe that your article does not address the real difference between .msi files and .exe files so here is what I believe your article should have looked like.
Inspiration for my article below comes from Sven Groot and Warren from http://channel9.msdn.com/Forums/Coffeehouse/30103-EXE-vs-MSI
Many believe that .msi files are a new .exe file. Not correct! First .msi files are not really new. The first time they were published (by Microsoft) was together with Windows 2000.
Second cosider the following:
EXE files can be anything. Almost everything you run on your computer is started by an EXE file (exceptions are Windows itself, drivers). They contain executable code for a computer to run, and can do anything.
MSI files are database files, used by Windows Installer. They contain information about an application which is devided into features and components, and every component may hold files, registry data, shortcuts etc. The MSI file also contains the UI that is to be used for installing, and various other data such as any prerequisites to look for, custom actions to execute, the order of the installation procedure, whether to support Administrative installations, etc. It can also contain the actual files to be installed themselves (this isn’t always the case though, the files can also be in an external CAB file or just as plain uncompressed files in a location where MSI can find them).
MSI files are the current recommended way of doing installations on Windows. The alternative is writing a program that performs the installation itself.
MSI files are executed by an EXE file that is part of Windows, called MSIEXEC.EXE. This application reads the data in the MSI file and executes the installation.
Windows Installer newest version is 3.0. Often installations that use MSI still come with an EXE (e.g. SETUP.EXE). This EXE is a so-called ‘bootstrapper’. It doesn’t perform the installation, it simply checks if the correct version of Windows Installer is present on the system, if not it launched the MSI Redistributable (MsiInstA.exe or MsiInstW.exe depending on the platform) and then launches MSIEXEC.EXE on the MSI file. In certain cases (especially Internet downloads), the MSI file and MSI redistributable are packed inside that EXE file, so you don’t see they’re there.
So installations can come in three flavours:
1. A custom, third-party installation system in an EXE file.
2. A Windows Installer installation in an MSI file.
3. An EXE file that bootstraps an MSI file (that may be embedded inside the EXE file).
Kind Regards
Kurt F.
MSI files can only be installations. EXE files can be literally anything that can run on your computer.
So, if I have both of them which one is the best choice?
Thanks
Just use the msi file If u are running any Newer version of windows e.g. xp or 7. However there are no clear answer to your question since it is not a question about who is best ;)
Kurt, thanks for adding your insight to the article. Should he helpful for users who would like to dig deeper.
nice explanation.. great…..
how do i get setup.msi off my computer?????
clearly written :)
Excelente comparación gracias por el aporte
y si muy bien explicado y concreto
Gracias!!
Can somebody in the forum explain the differences between setup.exe and the .msi structure and also the importance of using .msi?
Nicely explained, thanks!
This tool mentioned on MSDN forums: http://www.msitoexe.com
It’s easy to say that create both the msi setup and exe setup ! when user use VS to compile the setup file , it’s commonly create the msi file, not the exe file . so when you compiled the msi file , you need to convert the msi file to exe type as a copy . now here is a software can easy convert msi to exe . get it on site http://www.msi-to-exe.com , free to get it !
Why it never occur to me to find out the difference between these two file types. Thanks for the enlightenment, Martin =)