Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
422 views
in Technique[技术] by (71.8m points)

Wix and .NET Framework (prerequisites)

How can I have my Wix package to download the required .NET Framework when it's not yet installed in the client's machine? I already have the condition to check for the installed .NET version but I'm not sure how to have it downloaded and installed when not found.

ClickOnce does this automatically by checking the pre-requisites in the properties pages. I just need to have it done in Wix due to some other requirements.

Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

UPDATE Aug 2017: This very nice answer now appears outdated. Please also read the other answers in the "thread" for a few different "bootstrapper options".


The MSI package created by Wix is not able to do that. Windows Installer is rather limited and one MSI file (your installer) is not allowed to call another MSI file (the .NET Framework installer).

You will have to create a so-called bootstrapper (a setup.exe file) which can check for the specified pre-requisites, download and install them as needed, and then launches your MSI installer.

One way to create the bootstrapper is by using Visual Studio or the MSBuild task GenerateBootstrapper. Here's a link giving more details:

http://wix.mindcapers.com/wiki/Bootstrapper

If you only want to provide a single installer to your users you might want to create a self-inflating installation package containing both the setup.exe file and your MSI package. You could do that with iexpress, which is coming with Windows.

Here's another link giving an example: http://www.clariusconsulting.net/blogs/pga/comments/42831.aspx


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...