Automatically Install Runtime Libraries Using WiX

When my fileset contains DLLs with the same dependency on DLL files during C ++ execution, I need to install the file from VCRedist.exe. This can be tricky, since each DLL depends on a specific version of C ++.

  • How to add automatically distributed runtime components to my installer?

  • How to handle DLLs that require different versions of C ++ runtime in WinSxS?

+4
source share
3 answers

Neither heat nor Votive support the requested feature. Runtime libraries must be added manually.

0
source

You need to install the latest version (highest) version required by your libraries and a policy file that redirects older versions to the new version.

You can do both with the merge modules installed with Visual Studio. They are usually located in C:\Program Files\Common Files\Merge Modules . See MergeRef and an example of how to install Visual C ++ distributed with your installer . You also need to add the policy merge module to your installation.

+1
source

You can just make sure the latest vcredist is installed, it automatically includes support for older versions.

I think the easiest way is to use bootstrapper to install the runtime before starting the installer. You may need to create your own package, but it's easy to use the Bootstrapper manifest generator .

In the product.xml file, you can add an installation check to make sure it is not installed twice, for example:

  <InstallChecks> <MsiProductCheck Property="VCRedistInstalled" Product="{1F1C2DFC-2D24-3E06-BCB8-725134ADF989}"/> </InstallChecks> 

See here for other GUIDs.

0
source

All Articles