views:

93

answers:

3

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 then running setup.exe.

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

+4  A: 

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
There's more to it, running a program called "setup.exe" keeps UAC happy.
Hans Passant
Although this sounds reasonable this is not the main reason to have setup.exe.
0xA3
@Hans Passant: There are many ways to keep UAC happy, an MSI file can do that as well ;)
0xA3
"This is not the right answer", with no further information, is not a very useful comment.
Kristopher Johnson
A: 

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

csharptest.net
+4  A: 

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

Scott Chamberlain
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...
0xA3
+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