What's the difference between an EXE and a MSI installer?

馋奶兔 提交于 2019-12-03 06:36:07

UPDATE: Some resources with information on how to handle various types of setup.exe files:


An MSI file can only be launched by msiexec.exe - The Windows Installer Engine. An MSI file is a Windows Installer database file capable of installing software. It requires the right version of the Windows Installer Engine Runtime at the very minimum to be installable. Most systems are up to date with the latest engine versions since it comes down via Windows Update.

The EXE file you generate is a self-extracting launcher application containing both the MSI itself as well as various runtime requirements that the setup might have.

Various components an EXE file might include:

  • The version of the Windows Installer Engine Runtime the MSI requires (current version 5.0). These days this runtime should be installed by Windows Update, and your setup should just verify it is present.
  • Scripting runtimes required by custom actions in the MSI (Installscript for Installshield)
  • The .NET runtime version required by the application (Gaining on 10 versions now). I would prefer using Windows Update for this as well, but if your application is cutting edge, you might want to include the required engine.
  • Logo files and splash screens, potentially in different languages for multi-lingual setups
  • Several other components are possible

Note that an EXE file can also be a non-MSI installer. In other words an old-style installer not based on Microsoft MSI format - which is a MS-SQL database stored in an office-style binary file - but an installation script of various formats such as Wise Script, Instalscript, Inno Setup, etc... However, in this case the question was about the difference in size between the exe and the MSI coming out of an InstallAware build, and then the difference is the runtimes explained above.

The difference is : MSI package contains your files + install script, and the actual installation is run by the Microsoft Installer which is a part of Windows, and it takes care of displaying Windows, logging messages etc. On the other hand, your EXE installer is holding files + actual program logic to run the install itself, being responsible for pretty much everything, hence the difference.

The EXE probably contains setup routines that are otherwise performed by msiexec, which just executes whatever installation script is contained in the MSI.

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