0

I'm trying to build a setup installer for my application. One of the things that need to be installed is Microsoft Visual C++ 2010 Service Pack 1 to support some of my dlls I use.

Maybe I missing something but with everything I'm reading I need to be using a Merge Module to help me install Microsoft Visual C++ 2010 Service Pack 1 as a dependency. I read somewhere that I should be using Merge Modules. After trying to add a Merge Module to my setup project I ran into this page telling me that I should NOT use merge modules if I plan on updating dlls and servicing the product...

Seeing as how I intend to provide updates to this product often I was going to go the route suggested in the aforementioned link we recommend that you install a Visual C++ Redistributable Package. So I have the x86 and x64 redistributable packages, how do I package them with my Visual Studio install project?

Community
  • 1
  • 1
Arvo Bowen
  • 4,524
  • 6
  • 51
  • 109

2 Answers2

0

It depends on the technology you are using to create your installer, but the C++ runtimes are simply a set of two executable (one for each bitness) that you can include as part of your installer. You can then start the executable in silent mode using the /quiet parameter as part of your installation process.

Those installers are (mostly) smart enough to only install if the component is not already installed.

John Koerner
  • 37,428
  • 8
  • 84
  • 134
  • Yea, I get that. ;) My question was specifically asking how to deploy things like the redistributable exes with my `Visual Studio Install Project` (a setup/installer built with VS template). Back in the day when I used Inno it was easy! But I need to know how to do it with a Visual Studio Install Project. Thanks! – Arvo Bowen Jan 19 '17 at 16:25
0

In a VS setup project these things are usually installed by configuring prerequisites for your setup, so it might be there, at least the base redistributable exe for Visual C++. However a Visual Studio installer project that ships VC++ runtime redistributables can't predict or supply a service pack version of the prerequisites to install. Sometimes the Windows SDK/Kit will update the prerequisites for your setup project - for example the 8.1A SDK installs \Bootstrapper\Packages with product.xml updates for SQL CLR types. So you may find updates for C++ runtimes lurking in some of the SDKs, except that Microsoft started deprecating installer projects at that time. That's the history and a long-winded way of saying you may not find anything.

People have used WiX for this because the WiX bootstrapper has support for detecting and installing many prerequisites like this. Note that you do not need to build your MSI with WiX, just the bootstrapper that will install prerequisites then your MSI file. Here's a start:

How to include prerequisites with msi/Setup.exe in WIX

Also, you need one MSI per architecture. If your app is all 32-bit then you just need one install for both 32- and 64-bit OS versions. If your app runs native 64-bit you'll need a separate 64-bit install, and you won't package both x86 and x64 redistributables in one install.

https://blogs.msdn.microsoft.com/heaths/2008/01/15/different-packages-are-required-for-different-processor-architectures/

Community
  • 1
  • 1
PhilDW
  • 20,260
  • 1
  • 18
  • 28