开发者

.Net Installer - Diff between .exe and .msi

开发者 https://www.devze.com 2023-01-30 21:02 出处:网络
I am deploying my application using the installer that i create using the Setup and Deployment project in visual studio. When i build the setup project i get a .exe and a .msi file.

I am deploying my application using the installer that i create using the Setup and Deployment project in visual studio. When i build the setup project i get a .exe and a .msi file.

I开发者_JAVA百科 would like to know the difference between them.

I noticed that the .exe cannot work without the .msi, but the reverse is not so.


The exe file is a bootstrapper that installs any required prerequisites and then calls your setup, which is the msi file.

You can start the setup by itself, running the msi file, but it will fail if the required prerequisites are not installed (possible examples: .Net framework, VC++ redistributable, newer version of MSI, etc.)

It fails when you try to run the setup with the bootstrapper (exe file) and your msi is missing, because basically it will install all the prerequisites and then it will try to start your installer ( the msi file). If the file is not there, it doesn't have what to start.

Depending on your application needs, a similar technique would be to use Merge Modules for your application prerequisites. A merge module would basically load all the required components into your main installer so you'll end up just with one MSI file that has everything inside. You have to be sure that every component that you use has a merge module available, if it doesn't you'll have to use a bootstrapper.


Adrian is correct. This might add some more info.

http://www.ghacks.net/2009/03/23/msi-or-exe-setup/


I believe MSI files are just scripts for installation, with the association being the Windows Installer. Executable files wrap the MSI, creating a loader which does pretty much the same thing but can install prerequisites.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号