Marcelo
Marcelo

Reputation: 207

Why Visual Studio creates .exe installer files?

when I build solutions in Visual Studio, that generates installer files as .exe and .msi, .exe files are useful for what?

Upvotes: 5

Views: 2041

Answers (5)

the_mandrill
the_mandrill

Reputation: 30862

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.

Upvotes: 2

slugster
slugster

Reputation: 49965

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.

Upvotes: 0

Cody Gray
Cody Gray

Reputation: 245012

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:

Upvotes: 4

marapet
marapet

Reputation: 56586

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

Upvotes: 1

darioo
darioo

Reputation: 47213

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

Upvotes: 0

Related Questions