EXE 和 MSI 安装程序有什么区别?
我使用Installaware创建了一个安装包并生成了一个EXE和一个MSI。 EXE有3.1MB,MSI只有265K。为什么尺寸相差这么大?
I've created an installation package using Installaware and generated an EXE and a MSI. The EXE is 3.1MB and the MSI is only 265K. Why is there such a big difference in size?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
更新:一些资源,其中包含有关如何处理各种类型的 setup.exe 文件的信息:
MSI 文件:MSI 文件只能由
msiexec.exe
- Windows 安装程序引擎。 MSI 文件是能够安装软件的 Windows Installer 数据库文件。它至少需要正确版本的 Windows Installer 引擎运行时才能安装。大多数系统都通过 Windows 更新更新了最新的引擎版本。EXE 文件:您生成的EXE 文件是一个自解压启动器应用程序,其中包含MSI 本身以及设置可能具有的各种运行时要求。 EXE 文件可能包含的各种组件:
旧版Setup.exe安装程序:
请注意,EXE文件也可以是非MSI安装程序
换句话说不基于 Microsoft MSI 格式(存储在 Office 风格的二进制文件中的 MS-SQL 数据库)的旧式安装程序,而是各种格式的安装脚本,例如Wise Script
,Installscript
、Inno Setup
、NSIS
、etc...
但是,在这种情况下,问题在于差异EXE 和来自 InstallAware 构建的 MSI 之间的大小不同,差异在于上面解释的运行时。UPDATE: Some resources with information on how to handle various types of setup.exe files:
MSI File: 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.EXE File: 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:
Legacy Setup.exe Installer:
Note that an EXE file can also be a non-MSI installer
In other words an old-style installer not based on the Microsoft MSI format (which is a MS-SQL database stored in an office-style binary file), but rather an installation script of various formats such asWise Script
,Installscript
,Inno Setup
,NSIS
,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.区别在于:MSI 包包含您的文件 + 安装脚本,实际安装由 Microsoft Installer 运行,它是 Windows 的一部分,它负责显示 Windows、记录消息等。另一方面,您的 EXE 安装程序保存文件+实际的程序逻辑来运行安装本身,负责几乎所有事情,因此有所不同。
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.
EXE 可能包含由
msiexec
执行的安装例程,它只执行 MSI 中包含的任何安装脚本。The EXE probably contains setup routines that are otherwise performed by
msiexec
, which just executes whatever installation script is contained in the MSI.