WiX changes needed to simplify the installation of .NET 3.5 for Vista (and later) machines

We decided to take a decisive step and require our users to install .NET 3.5 before they can use our media center.

I want to make sure that the installation process is as smooth as possible, and that our installer remains small.

What changes do I need to make to the WiX file to support the following scenarios? Code examples would be much appreciated.

  • User installed .Net framework 3.0, an interactive installation.

Desired behavior : the user is prompted with a window indicating that she needs a new version of the framework, if she accepts, dotNetFx35setup.exe (2.7 MB) is downloaded and then executed. Finally, the installation continues.

  • The user has the .NET Framework 3.0 installed, a non-interactive installation.

Background . To facilitate automatic updating from the media center, we can run "msiexec.exe / qb / i mediabrowser.msi" if the user decided to upgrade the existing version.

Desired behavior : the user is prompted with a window indicating that she needs a new version of the framework, if she accepts, dotNetFx35setup.exe (2.7 MB) is downloaded and then executed. Finally, the installation continues silently.

Are there any other open source projects that are implementing something in this direction?

Related question : Is .NET 3.5 a reasonable prerequisite for a media center plugin?

+2
source share
4 answers

From Rob Mensching, lead WiX developer: This is a key scenario for Burn (an already created WiX download toolkit).

So no, there is no built-in way to simplify the process with WiX pure. However, you can write your own bootloader .

+1
source

I believe that installing .NET is the responsibility of the setup.exe bootloader before your msi starts up. WIX does not yet have its own way of generating a boot file (or, if so, it is not documented in wix.chm). Instead, you can use the msbuild GenerateBootStrapper task to generate the setup.exe file. Take a look at the topic β€œ How to install the .NET Framework using a boot device” in the wix documentation. You will like your msbuild file to install .NET 3.5 SP1 at boot time:

<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <BootstrapperFile Include="Microsoft.Windows.Installer.3.1" > <ProductName>Windows Installer 3.1</ProductName> </BootstrapperFile> <BootstrapperFile Include="Microsoft.Net.Framework.3.5.SP1" > <ProductName>Microsoft DotNet Framework 3.5 SP1</ProductName> </BootstrapperFile> </ItemGroup> <Target Name="SetupExe"> <GenerateBootstrapper ApplicationFile="myproduct.msi" ApplicationName="myproduct" BootstrapperItems="@(BootstrapperFile)" Path="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\" OutputPath="path/to/put/setup/" Culture="en"/> </Target> </Project> 

If you save this in the setup.msbuild file, you can create your own customization by calling

C: \ WINDOWS \ Microsoft.NET \ Framework \ v3.5 \ MSBuild.exe setup.msbuild

You can also install .NET from the installation CD, rather than downloading it. Just add ComponentsLocation="Relative" to the GenerateBootstrapper attributes.

+2
source

dotNetInstaller supports it all

+2
source

For this you need to use the bootloader. Microsoft Installer will not allow you to run another installer if it is already running. There is a bootstrap generator that you can use from the msbuild files included in Visual Studio, or you can see many open source options.

dotNetInstaller are popular options. And β€œBurn” is the name of the upcoming WiX tool for this task. But for now, this is a concept-tableware.

+1
source

Source: https://habr.com/ru/post/1285885/


All Articles