visual-studio EXE 在 Visual Studio 安装项目输出中做什么
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/42366/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What does the EXE do in the Visual Studio setup project output
提问by Scott Keck-Warren
We are working on a winforms app in Visual Studio 2005 and the setup project we created output both an MSI and an EXE. We aren't sure what the EXE file is used for because we are able to install without the EXE.
我们正在 Visual Studio 2005 中开发一个 winforms 应用程序,我们创建的安装项目同时输出 MSI 和 EXE。我们不确定 EXE 文件的用途,因为我们可以在没有 EXE 的情况下进行安装。
采纳答案by Domenic
It's a bootstrapper that checks to make sure that the .NET Framework is installed, before launching the MSI. It's pretty handy.
它是一个引导程序,可在启动 MSI 之前检查以确保安装了 .NET Framework。这很方便。
I suggest using something like SFX Compiler to package the two together into one self-extracting .exe and then launch the extracted setup.exe. This way you retain the benefits of the bootstrapper, but your users only download a single thing.
我建议使用 SFX Compiler 之类的东西将两者打包成一个自解压 .exe,然后启动解压的 setup.exe。这样您就可以保留引导程序的好处,但您的用户只下载一个东西。
Edit: also see
编辑:另见
- The official line: MSDN documentation
- Some bootstrapper customization: some guy's blog post about what he did
- 官方线路:MSDN文档
- 一些引导程序定制:某人关于他所做的事情的博客文章
回答by CannibalSmith
The EXE checks if Windows Installer 3.0 is present and downloads and installs it if it's not. It's needed only for Windows 2000 or older. Windows XP and newer all have Windows Installer 3.0 out of the box.
EXE 检查是否存在 Windows Installer 3.0,如果不存在则下载并安装它。只有 Windows 2000 或更早版本才需要它。Windows XP 和更新版本都具有开箱即用的 Windows Installer 3.0。
Other prerequisites, like .NET, are checked for by the MSI itself.
其他先决条件,如 .NET,由 MSI 本身检查。
回答by Craig
I think the EXE is just a wrapper/bootstrapper for the MSI in case you don't have Window Installer. If you have the requisite Windows Installer version installed then the MSI should work fine on its own.
我认为 EXE 只是 MSI 的包装器/引导程序,以防您没有 Window Installer。如果您安装了必要的 Windows Installer 版本,那么 MSI 应该可以正常工作。

