If you've ever gone to install a program on
Windows, you may have noticed that there are one of two possible file types for installing
the program. It could be an .exe file, an executable or
a .msi file. So for one example, if you go to download
Firefox the browser, you do actually have the option to download either as an .exe or
an .msi file. And he may have what is really the difference? Is it better to use one or the other? And why? So in this video, I am gonna explain what
the differences are, what this .msi file is and why you might wanna use one over the other,
if you do have the choice. So an .exe file it's executable, which basically
just means it does something. It's not like a file type that just stores
data like a .docx file for Word or a text file or something like that, where another
program reads it. The .exe is the program itself. Now it can do several things, it can be just
a general purpose program that runs or something, or it could be a mini program that runs, and
its only purpose is to install another main program. And in that case it would be the installer. But there is the other file type dot msi. MSI is short for Microsoft installer and unlike
an .exe file, which could be like a general purpose. It can be either an installer or the program
itself. An .msi file will always be an installer file. It's a specific format created by Microsoft to standardize installation files. And one of the main differences with an .msi
file is it doesn't actually execute any code itself. So the .exe file, you run it and it itself
does everything to install the program, it puts all the files in the correct place, whatever. Whereas an .msi file is more a container, it's a wrapper, a set of instructions, and
then something else takes all that data and does the actual installing, and that is the
windows API. So put in simpler terms, when you run an .msi
file to install something, you basically are telling Windows itself, not the file, but
Windows, "Hey, I have a program here that needs to be installed. Can you install this program for me?" And then Windows will use its API, and it
has a dedicated centralized program to deal with these installer files called .msiexec. So then you're actually running this msiexec.exe,
which is an executable, to come and handle this container. And it contains instructions for where to
put the files, what changes need to be made to the registry, that sort of thing. So the outcome of the installation is gonna
be the same, whether it's an .exe file or an .msi file. So you might be wondering, well then why use
one over the other? Now, whether it makes a difference if you
use an .msi or the .exe installer is really gonna depend on your use case. If you're just a home user installing a program
for yourself on your own computer, it really doesn't make a big difference. Although, I would recommend probably using
the .msi if you have the option, although again, it doesn't really matter. And I'll explain why that is next. However, there are advantages for certain
cases like if you're an enterprise or you're an IT administrator and need to install a
program on a whole fleet of computers all at once, then there are major advantages to
using an .msi. And one of them is that it is standardized
and that means that there are known switches or parameters that you can use. On these .msi files, they're all the same. So for example, you could install all the
programs automatically using quiet mode, which means it doesn't pop up a thing to confirm
every step. So if you're installing a program on a user's
computer remotely, then it will just do itself automatically instead of requiring the user
to click through all these settings, and then you have to explain to the user which ones
to click and all that nonsense. And there are a whole bunch of different switches
they're called. So for example, one could be to force a repair
of the files. Another one could enable logging, if there's
a problem, then it will add more log files, so you can figure out what's going wrong. Whereas if you're using an .exe file to install
something, there are several possible installer platforms that you could use. I don't know if platform's the right term,
but basically different software products that you can buy to create an installer for
your particular program, and that is not a standardized one from Microsoft. And they might have additional features that
might require extra stuff that an .msi file can't handle. But that means that if you're installing something
with an .exe, you don't really know what switches or parameters it could have, unless you look
it up. For the average person though, like you and
me, there are two slight advantages I would say from my understanding for .msi files,
to use them instead, if you can. And one of them is when you run an .msi file,
just automatically as part of this standard format, it will create an uninstall script
automatically to basically roll back anything it did. Whereas with an .exe installer, it might also
include an uninstaller if you go to uninstall it, but you don't know that it's actually
removing all the things that it installed. So with an .msi file, you can know that you're
more likely to actually remove all the stuff that did get installed, because since it's
just a set of instructions for where to put what files, it's simple enough to just reverse
that process. Now of course there is one caveat, which is
that if the program creates files after it's actually installed, well then that is up to
the program to remove those files because the .msi installer only handles what is created
initially when installing it. If the program then create settings and backups
and whatever after you run it, then that might not be uninstalled either way. Another advantage is that you will probably
know that an .msi file is not gonna be a virus. Whereas an .exe file, like I said, it can
be used for lots of different purposes. It could be a legitimate installer, or it
could be a virus in itself. Whereas a .msi file, you know what it is. It doesn't execute anything itself, it's just
a set of instructions. So it makes a lot less sense for a virus to
be distributed as an .msi file. I mean, theoretically, it could be possible
that it's distributed in an .msi file that installs the virus. But then at that point, if you're getting
the user to run that anyway, then you may as well just distribute any .exe file. So I'm not really aware of any viruses that
have ever been distributed as an .msi, there might have been them out there, but it's extremely
rare where you don't have to worry about it really, or at least not nearly to the degree,
if it's an .exe file. Now of course, in any case, whether you're
downloading an .msi or .exe you still have to take into consideration where you're getting
the file from. If you're just downloading it from a torrent
or something, you still don't know what it could be installing. It could be installing bloatware, adware,
something like that. Even though it's not a virus itself, theoretically,
again, it could be putting stuff you don't necessarily want there. So if you're downloading a program from like
Firefox from the official website, you probably don't need to worry in terms of security,
which one you choose. But if you're getting it from some random
place that, yeah, you believe this is a secure thing, but it's distributed as an .exe, you
might be a little more sketched out than if it's distributed as an .msi file. But again, it's just one thing to consider
out of the rest of the common sense you're gonna be using for whether you should trust
a file or not. So to answer a question, very straightforward. If you have the choice, should you install
with .msi? And I would say yes personally, I would, but
that's not always the option. Sometimes you do have programs that are available
as both. For example, I mentioned Firefox, although
you do have to kind of seek it out. If you just hit download, it's gonna download
by default as an .exe. However, if you do click download options
and other languages, you do have a dropdown where you can select your preferred installer
and here you can see you can download it as an .msi or not, and you would just have to
select that. So sometimes you do have to go a little bit
outta your way to find other types of installers they offer. Another example is Google Chrome. If you wanna get the .msi installer for that,
you actually have to go to this enterprise page for Chrome. And I found this by Googling "Chrome .msi
installer", and then that took it to this page. From what I understand, there's not really
a way to get to this directly. But here it does show you an option where
you can download either as a bundle, which seems to be just the msi plus some extra stuff, or just the .msi file. And again, they're kind of catering this towards
enterprises, which are gonna be installing it on a whole bunch of different systems at
once. Now, one example for software that uses .msi
by default is Elgato of software. I found. So for the Stream Deck, stuff like that, I
found that it seems like all their software on their download pages download as .msi by default, so that's interesting. So if you do want to get the .msi installer
for whatever reason, you just prefer it, or you do have to install it on a whole bunch
of systems, then what you could do is again, search for the name of the program. And then "msi installer", maybe it'll bring
up that page. Or sometimes you can also search the program
name and then "offline installer", that might give you multiple options. Because a lot of times programs, when you download the installer, it's basically
just a downloader that then downloads the installer, if that makes sense. So for Google Chrome, this is what happens. You may download the installer, technically
it's called, but then it's a very small file, and then that thing just actually downloads
the installer. So it's kind of weird, but. Sometimes you can actually download the offline
installer it's called, which contains everything in itself. And then sometimes that is what the .msi file
will be. So you'll know that if it's an .msi file,
it's gonna be an offline installer. So that might be another advantage if you
don't like using the online downloader thing, you can look for the .msi version. So not too much more to say about it, if you
were ever wondering whether it makes a difference, the answer is not really, but you may slightly
be biased towards using the .msi if you have the choice. So if you enjoyed this video, let me know
into comments, give it a thumbs up. And if I left anything out, feel free to let
me know down there too. Also, if you're new here, maybe consider checking
out the rest of my channel, seeing some of the videos I've uploaded recently and consider
subscribing. And if you do be sure to click the bell next
to the subscribe button to enable notifications. So the videos don't get lost in the rest of
your subscription feed. I upload about twice a week. And finally, if you guys want to keep watching
the next video, I'd recommend is one where I made, talking about a really cool spectrometer
gadget that I have, and I tested out some blue light blocker glasses to see if they
actually work, stuff like that, should be pretty cool. I'll put that link right there. So thanks so much for watching guys. And I'll see you in the next video.