December 2012
Intermediate to advanced
488 pages
10h 23m
English
As we saw in the previous chapter, we can download a package from the Internet or a local network, as in the following example where we use the NetFx40Web package from WixNetFxExtension to download the .NET Framework:
<Chain>
<PackageGroupRef Id="NetFx40Web"/>
<MsiPackage SourceFile="Lib\MyInstaller.msi" />
</Chain>In order for our custom UI to allow this download to proceed, we must handle the ResolveSource event. The following is an example that uses an anonymous method in our viewmodel's constructor:
this.model.BootstrapperApplication.ResolveSource += (sender, args) => { if (!string.IsNullOrEmpty(args.DownloadSource)) { // Downloadable package found args.Result = Result.Download; } else { // Not downloadable args.Result ...Read now
Unlock full access