EXE 和 MSI 安装程序有什么区别?

发布于 2024-09-26 18:02:44 字数 78 浏览 3 评论 0原文

我使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

踏雪无痕 2024-10-03 18:02:44

更新:一些资源,其中包含有关如何处理各种类型的 setup.exe 文件的信息:


MSI 文件:MSI 文件只能由msiexec.exe - Windows 安装程序引擎。 MSI 文件是能够安装软件的 Windows Installer 数据库文件。它至少需要正确版本的 Windows Installer 引擎运行时才能安装。大多数系统都通过 Windows 更新更新了最新的引擎版本。

EXE 文件:您生成的EXE 文件是一个自解压启动器​​应用程序,其中包含MSI 本身以及设置可能具有的各种运行时要求。 EXE 文件可能包含的各种组件:

  • MSI 所需的 Windows Installer Engine Runtime 版本(当前版本5.0)。如今,这个运行时应该由 Windows 更新安装,并且您的设置应该只是验证它是否存在。
  • 编写 MSI 中自定义操作所需的运行时脚本(Installshield 的安装脚本)。
  • 应用程序所需的 .NET 运行时版本。我也更喜欢使用 Windows 更新来实现此目的,但如果您的应用程序是最先进的,您可能需要包含所需的引擎。您可以将其设置为下载而不是嵌入吗?您也可以将其作为单独的下载提供。
  • 徽标文件和启动屏幕,可能采用不同的语言以进行多语言设置。
  • 几个其他组件也是可能的。

旧版Setup.exe安装程序请注意,EXE文件也可以是非MSI安装程序换句话说不基于 Microsoft MSI 格式(存储在 Office 风格的二进制文件中的 MS-SQL 数据库)的旧式安装程序,而是各种格式的安装脚本,例如 Wise ScriptInstallscriptInno SetupNSISetc... 但是,在这种情况下,问题在于差异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:

  • 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. 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. Can you set it to download rather than embedding? You can also supply it as a separate download.
  • Logo files and splash screens, potentially in different languages for multi-lingual setups.
  • Several other components are possible.

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 as Wise 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.

电影里的梦 2024-10-03 18:02:44

区别在于: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.

自由如风 2024-10-03 18:02:44

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文