开发者

Why Visual Studio creates .exe installer files?

when I build solutions in Visual Studio, that generates installer files as .exe and .msi, .exe fil开发者_如何学Pythones are useful for what?


The .EXE file that is created by the installer project is a bootstrapper for the .MSI setup file. It is used to launch the .MSI setup file.

Generally, both will launch the setup program and allow the user to install the application. However, sometimes the setup.exe file will run a custom validation routine to determine if the user's computer meets the minimum requirements for installing the software.

For example, if the user does not have Windows Installer, they will not be able to launch the .MSI file, but the .EXE application will still run and inform them that they need to install Windows Installer first. For .NET applications specifically, the .EXE file verifies the presence of the appropriate version of the .NET Framework, and if it is not present, it prompts the user to download and install it.

You can customize the prerequisites that are required for your application in your installer project using Visual Studio. See these MSDN articles for details on how to do that:

  • http://msdn.microsoft.com/en-us/library/ms165429(v=VS.100).aspx
  • http://msdn.microsoft.com/en-us/library/7eh4aaa5(v=VS.100).aspx


Others have commented on the how (.exe bootstraps the .msi) but part of the reason why is that users know that .exe files are the things you run. I don't think your average user knows that .msi files are something that you can click on to install an application.


The .exe file is made for installing the prerequisites of your application.

Let's say your application uses the .Net 3.5 framework, you can tell the installer project to include the installation of the needed libraries if they're not already installed.

You may also deactivate it, so only the .msi is being created.

This page shows how to activate and configure the prerequisites setup, just uncheck the checkbox in order to deactivate it.

You also find more details on the process of Bootstrapping on MSDN:

the capability to automatically detect the existence of components during installation and install a predetermined set of prerequisites


.exe files are useful for executing your programs that you've just built in Visual Studio, assuming you're not doing web applications.

Pretty much every Windows program out there is executed using files with an .exe suffix.


Installer exe files are normally just the msi wrapped in a bootstrapper. The bootstrapper can do anything, but normally its purpose is to ensure the user is running a sufficient version of Windows Installer, then extract the msi and invoke msiexec.exe to start installing the msi. Generating installers as exe's is deprecated these days, but some still do it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜