Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy Visual C++ redistributables in WiX using Burn

Tags:

wix

wix3.6

burn

We just migrated our installer from WiX 2.x to WiX 3.6 and started using Burn. Previously, we were installing the Visual C++ redistributable by including the .msm files from C:\Program Files\Common Files\Merge Modules to our MSI. Those files are always in sync with the one we use to build our product (they are updated frequently by Microsoft to include security fixes).

Now, we would like to have the Visual C++ redistributable downloaded only if required by using the Burn framework. However, Burn does not define a MsmPackage element to place inside Chain.

What is the best approach for deploying Visual C++ redistributable using Burn?

like image 322
decasteljau Avatar asked Sep 30 '11 15:09

decasteljau


People also ask

How to extract a burn (Wix) based Installer/installation/setup file?

How to extract a Burn (WiX) based installer / installation / setup file 1 Install the most recent WiX Tool set 2 Add the “bin” folder of the WiX Toolset to the PATH Environment Variable (you do not have to but it makes life easier) 3 Run the following command to extract your burn based installer: dark [burnbasedinstaller].exe -x [OutPutFolder]

Why use a Wix bootstrapper project?

Why use a WIX Bootstrapper project? In our project there are so many things that we need to install before our software will be installed. At that time we can use this to bundle the prerequisites (like .Net Framework, SQL etc.) of Software or Website. Using this we can put all the necessary things into a single package so it is easy to manage.

How do I install a Wix application using the NET Framework?

Applications written using the .NET Framework often need to bundle the .NET framework and install it with their application. Wix 3.6 and later makes this easy with Burn. Follow the instructions in Building Installation Package Bundles. Add a reference to WixNetFxExtension to your bundle project.

How do I add wixnetfxextension to a Wix bundle?

Add a reference to WixNetFxExtension to your bundle project. Add a PackageGroupRef element to your bundle's chain that references the .NET package required by your application. For a full list, see [WixNetfxExtension] (../../customactions/wixnetfxextension.html). Ensure that the PayloadGroupRef is placed before any other packages that require .NET.


2 Answers

Merge modules can only be merged into an .msi; they can't be installed independently. You can use ExePackage to install the appropriate vcredist*.exe.

like image 170
Bob Arnson Avatar answered Nov 10 '22 01:11

Bob Arnson


This is what you should do:

  1. Create an MSI project that only includes the merge modules you need.
  2. Clamp the MSI package version number, product code and upgrade code.
  3. Use the MSI in your bundle.

Now 2) will ensure that in upgrade scenarious the MSI won't be installed, or if it is an external payload, it won't be downloaded.

The problem with packaging vcredist*.exe is that some user might think that it is an independent install and uninstall it and break your application.

like image 35
parapura rajkumar Avatar answered Nov 10 '22 02:11

parapura rajkumar