How to install redistributable with visual studio setup?
Asked Answered
E

2

5

I wish to make my installer (visual studio setup) to install redistributable (Visual C++ 2013 redistributable x86) in case it isn't installed on the PC or install the necessary dll for my program. I don't wish to set a launch condition.

If possible, I wish that the installation of the redistributable to be silent.

Any suggestion ?

Eyla answered 2/6, 2015 at 12:12 Comment(0)
M
10

That's what the Prerequisites button is for in the setup project's Properties. You'll need to set a configuration (such as Release) before you see that button. That's where you add the VC++ runtimes. That will generate a setup.exe that users run - it will install any of those prerequisites and then install your MSI file.

To make it silent you'd need to get into the manifest file that describes the command used to install the runtime, and change it to a silent command. There used to be a tool called the Bootstrap Manifest Generator that would do that kind of thing, if you can still find it.

There's no support I know of for any of the following, but this is how the VS bootstrapper works, so mangle at your own risk :)

You could open the built setup.exe as a file with Visual Studio and examine the resources - under 41 there's a setupcfg that's the specicification for the prereqs. You'd need to export it, alter it and re-import it.

Alternatively, the template for the standard prereqs that this uses comes from the SDK in architecture-dependent locations such as Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages\vcredist_x86\product.xml so if you go in that Xml file and find the correct VCRedistInstalled settings and command lines, make it silent, and it should propagate into the setup.exe when you do the build. This is unsafe because a) you've altered a file so that will now not be updated by any SDK updates b) The file doesn't match the one installed by the SDK and there may be installer repair issues and c) Every bootstrapper build will be affected.

Meanly answered 2/6, 2015 at 18:52 Comment(1)
Thank you but is there any way to make the installation of the redistribuable silent ? I tried to install it silently with custom action but I got the following error while installing : 0x80070652.Eyla
D
0

You can use Merge modules and add it to your setup/msi which will install quietly

Destefano answered 24/6, 2016 at 6:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.