I want to use the WiX bootstrapper burn
to automatically download and install the vcruntime140 package (Visual C++ Redistributable for Visual Studio 2015) if it is required.
It's trivially easy to do this for the .NET frameworks:
<Chain>
<PackageGroupRef Id="NetFx452Web"/>
...
</Chain>
but I can't find an equivalent for the vcruntime packages. (Is that because there isn't one, or am I just typing the wrong keywords into Google?)
Just to be clear: I do not want to include the package with my installer. It must be a web download.
Just for the record, here's my final solution.
Right-click on the bootstrapper project References in Visual Studio and add a reference to WixUtilExtension.
Add
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
as an attribute to the top levelWix
element.Add to the
<Chain>
element:Add as a child of the
<Wix>
element:UpgradeCode
came from this answer and is specific to v14.0.24215 of the vcredist installer. This is how the bootstrapper decides whether it is already installed.Compressed="no"
tells the installer not to include the file in the installer itself (since we want to download it from the web).DownloadUrl
is a direct URL to the downloadable installer from this answer.RemotePayload Description
is the text of the installer's Description resource and likewiseProductName
. (It appears that the text does not have to match the text in the resources.ProductName
is the description shown in the bootstrapper's progress dialog.)Size
is the size in bytes.Hash
is found with the Powershell commandget-filehash -algorithm SHA1 .\vc_redist.x86.exe
.I hope this helps someone.
There is no PackageGroupRef for the redist as for .net.
But there is 3 other options: