How to install 3rd party prerequisites on c# msi

不羁岁月 提交于 2019-12-12 22:02:10

问题


I have created a .msi in visual studio 2008 containing my project and it requires prerequisite third party software to run including WinZip. I have had a look round and from what I've seen, there's a prerequisite window where you can select programs like .NET framework. I have also had a look at writing a bootstrapper to check whether the third party prerequisites have been installed on the machine but I've hit a brick wall. Any other suggestions or some advice on how to do this would be very helpful.

Thanks


回答1:


As Ramhound suggested in his comment, have a look at the commercial products to author your installer. Several, including my personal favorite Advanced Installer, offer free versions of the tool that may satisfy your initial requirements.

Depending upon how the prerequisites are packaged (MSI or EXE) your MSI might not directly be able to install the prereq without the use of a custom action or a bootstrapper that would search the target system for the prereq and install it if it not present on the target system.

As an aside, I have no affiliation with Advanced Installer other than the fact that I've been a paying customer for a few years now. In addition to a solid product their service is excellent as well.




回答2:


You can use the ClickOnce bootstrapper. See this page for an example how to use it to install the .net framework.

Bootstrapper packages are installed in C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\, or a newer location. You can add your own package. To help you create one, use the Bootstrapper Manifest Generator.

The result is a setup.exe which first checks if the prerequisites are installed, and if not installs it. Then your .msi will be executed.



来源:https://stackoverflow.com/questions/8432858/how-to-install-3rd-party-prerequisites-on-c-sharp-msi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!