8

I've created my first setup project using Visual Studio 2010. I've noticed that when I build the setup project it generates an MSI installer file and a setup.exe executable. However, I seem to be able to just right click on the MSI file and choose install to install my application rather than running setup.exe.

Does the setup.exe file that is generated do anything other than just fire up the MSI file? When distributing my application can I just provide the MSI file rather than the MSI file and the setup.exe file?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Eric Anastas
  • 21,675
  • 38
  • 142
  • 236
  • possible duplicate of [What are the specific differences between .msi and setup.exe file?](http://stackoverflow.com/questions/1789530/what-are-the-specific-differences-between-msi-and-setup-exe-file) – Dirk Vollmar Oct 18 '10 at 22:00
  • see also http://stackoverflow.com/questions/902841/why-do-so-many-programs-have-both-a-setup-exe-and-a-setup-msi – rds Dec 30 '10 at 16:23

3 Answers3

9

Kristopher Johnson is correct about the older machines, but it also does something else. When you are setting up the installer you can set dependencies and locations to download those dependencies. The Setup.exe does those dependency checks and launches the other MSI files in to install them. This is most often used to make sure Windows has the correct version of .NET or the C++ runtime installed.

If you do not have dependencies and you can guarantee .NET or the C++ runtime is installed then you do not need to distribute the setup.exe file.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431
  • Exactly. And this is also the reason why you should always install by executing setup.exe, unless you like to get into trouble or explicitly know what you are doing... – Dirk Vollmar Oct 18 '10 at 21:54
  • +1 for correct answer. One can actually look at (and alter) the source of that setup.exe if they wish, though I've not done so in some time myself. – Andrew Barber Oct 18 '10 at 22:03
4

Many (most?) users are accustomed to running the "SETUP" program to install something. That's why it's there. It's a good idea to provide it, unless you are certain that only technically knowledgeable users will be installing your application.

SETUP.EXE is also useful if somebody tries to install on an older version of Windows which doesn't have support for MSI files. In that case, it displays some sort of "You cannot install this program on this version of Windows" error message.

Kristopher Johnson
  • 81,409
  • 55
  • 245
  • 302
0

I believe (but could be mistaken) that it performs boot-strapping of the correct version of MSI.

csharptest.net
  • 62,602
  • 11
  • 71
  • 89