Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2017 Installer Project - include VC++ 2015 Redistributable

I am creating the installer for my application using a "Visual Studio Installer" project type in Visual Studio 2017.

I want my installer to install visual c++ redistributable 2015 with my application. I've downloaded the vc_redist.x86.exe file, included it in my project, and I'm trying to do the install as a custom action on "install". I am launching with the arguments /install /passive /norestart.

When I execute my installer, when it does the custom action, I get this error:

There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.

I can run vc_redist.x86.exe /install /passive /norestart at the command prompt with no problem or errors.

Any suggestions or alternative ways to include Visual C++ redistributable as part of my install?

like image 623
leesand Avatar asked Oct 15 '25 16:10

leesand


1 Answers

You can't run that redistributable as a custom action because it's an MSI-based install, and you cannot run recursive MSI installs (yours calling the VC redist one).

In Visual Studio setup projects you're supposed to use the Prerequisites feature. Right-click the setup project in Solution Explorer, choose Properties, then Prerequisites. This will build a setup.exe to install prerequisites followed by your MSI file. As far as I can tell, the Microsoft Visual C++ 14 is the Visual Studio 2015 runtimes.

like image 98
PhilDW Avatar answered Oct 17 '25 08:10

PhilDW



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!