Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VB.net - what is the difference (or relation) between setup.exe and .msi file?

Posted on 2014-07-29
9
941 Views
Last Modified: 2014-07-29
What is the difference (or relation) between setup.exe and .msi file?
I have always thought that I should run .msi file, when installing my VB.net projects to other PCS.  However, in the last week, I was getting Crystal reports error on Win7 64bit PC's.  

When I ran the setup.exe instead, the Crystal reports error was fixed.

Just curious about "setup.exe" versus ".msi" files.
Any insight greatly appreciated.
0
Comment
Question by:down0041
9 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 40226693
The .msi is the actual installation database for your application. The .exe is a bootstrapper, which generally takes care of installing prerequisite packages and other tasks.

An msi can only install a single application, so if you need any prerequisites installing that also come as a .msi, then the bootstrapper takes care of installing them by launching the relevant .msi.
0
 

Author Comment

by:down0041
ID: 40226730
Carl, thank you very much for your reply.  Is it correct to say then, that I should always use the setup.exe, when installing VB.net apps?  

Thanks again very much for your quick reply!
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 40226747
It depends on your requirements, and what package you are using to create your installation package, and also your deployment method.

If you are deploying on CD/DVD then it doesn't really matter. If it is a web deployment then, if you use an EXE, you will want to embed the MSI within it, rather than leaving it as a seperate component. Also bear in mind that a setup.exe will increase the overall size of the installation package, which may or may not be an issue for you if it is a web download.
0
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 

Author Closing Comment

by:down0041
ID: 40226769
Carl, thank you very much.  This is exactly what I was looking for.

Would you please recommend to me any books on VB.net?  I am a SQL guy, that through necessity occasionally creates vb apps.   I understand the basic syntax just fine.  I am more interested in working with data.  I was "almost competent" in VB2003 (using dataAdapters).  Now in VB0212, it looks like everything has moved to tableAdapters, and I am struggling.
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 40226832
Yeah, there are various data access methods around nowadays (TableAdapters, Linq-to-SQL, Entity Framework, etc).

I'm generally a fan of Wrox and Apress books so you might want to look at a few of those. Although, you tend to find that most books try to cover a broad range of topics, rather than data access specifically, so sometimes don't go very deep into the subject.

It might be worth hunting around on MSDN for articles and tutorials, perhaps starting with this:

http://msdn.microsoft.com/en-gb/data/ee712907
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40226837
>  Is it correct to say then, that I should always use the setup.exe

It's correct to say that with most products that come with setup.exe, you should always try to do the opposite, i.e. extract .msi file and try to use that and avoid using setup.exe. Of course there can be exceptions.

The main reason is that setup.exe is not always "innocent". As Carl noted, its main functions are (1) checking prerequisites and installing them if needed, and (2) unpacking the msi and launching it. However, some setup.exe's can also (3) install additional software, for example to periodically check for the updates (4) install software you don't need at all, from the vendor who "sponsors" software maker - such as McAfee, Norton, and similar. I.e. in way too many cases the reason software vendor has wrapped the installation into setup.exe is not technical but marketing.

I personally usually do the following. I launch setup.exe, wait until it shows welcome screen, then go to the %temp% folder, "steal" the actual installation, cancel setup.exe, then launch the installation. In most cases it works,; if not, that's when you run setup.exe.

Another scenario is installation of drivers. Again, driver vendor usually tries to do it by setup.exe that will install the driver, but also ton of "value-added" applications, supposedly for better using of the device. For example, you download 120MB driver for HP scanner, and there 1% is the actual driver, and 99% is a "suite" of stuff that will take over half of your system tray trying "to help". Or it's ugly Realtek audio panel, still in windows 3.1 style, that will replace the regular one. So, as soon as all this treasure is unpacked, you go to %temp%, find the actual driver (the directory with .sys and .inf files inside), then update the driver from device manager pointing it to that directory.
0
 

Author Comment

by:down0041
ID: 40226877
Carl - thank you very much for your book suggestions. Greatly appreciated.

Vadimrapp1 -  Thank you very much for your comments.  Your explanation is greatly appreciated as well.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 40227002
In theory, because the setup.exe is a wrapper, there could even be more than one .msi file.  The desired one for your configuration is then called.  Installing directly from the msi could lead to problems because you choose the 'incorrect' version.
A setup.exe from a commercial vendor should be OK, those for free utilities/apps (from the web) may well, as vadimrapp1 states, install other software silently to your detriment.
0
 

Author Comment

by:down0041
ID: 40227010
AA - thank you.  That makes sense.  Thank you for this.
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help with opening combobox using VB.NET. 3 25
Windows Restrict installation 11 38
VB.Net Determine if a mapped network drive exists 2 31
Why use this lambda? 12 37
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question