Recommendation: Migrate to WiX Burn (bootstrapper / downloader / sequencer) to allow more future flexibility and control (WiX links below).
Alternatively try the prerequisites section below first (select the "Visual Studio 14
" entries for install) or try the merge modules available (section below). Please pay attention to the disclaimers for the merge modules.
Logging & Mutex: What does the log file say? From a technical point of view the usual problem is that you can not install another MSI package from within your own running MSI setup due to technical runtime restrictions. A mutex is set to prevent several MSI installation transactions to happen at once. Check the logs. This redistributable is MSI-based I believe - so you will see this problem when running the EXE from a custom action like you do.
Deployment Tools: Visual Studio Installer Projects are very limited, and it seems most people migrate away from them to another deployment tool over time. Maybe have a look here - and here is a list of tools. WiX's Burn feature (bootstrapper / downloader / sequencer) can achieve what you need. Also read PhilDW's answer here.
Prerequisites: Visual Studio Installer Projects do have a prerequisites view (click the Prerequisites...
button) where a limited number of prerequisites can be defined for installation via the setup.exe
bootstrapper (not kicked off from within your MSI itself, but from its bootstrapper setup.exe - this means you don't kick off the install from within your own MSI, but before it starts to install - and it can hence work correctly). I am not sure if the entries for "Visual Studio 14
" are for the runtime version you need. You could give it a try I suppose.
Merge Modules: There are merge modules to install the Visual Studio Runtime (see here, section "Visual C++ Runtime" - quite a bit down the page), but they seem inadequate these days for reasons explained here (very important). Essentially the Visual Studio Runtime is more complicated from 2015 onwards - and the EXE installer is preferred. Must read link - please. In order to locate relevant merge modules, please search for *.msm files underneath %ProgramFiles(x86)%
- if you have Visual Studio (and / or the Windows SDK) installed. Merge modules can be installed embedded in your own package without the need for a setup.exe launcher
. In Visual Studio, right click your installer project, Add
, then Merge Module...