Include Microsoft C++ redistributable with application installer?

6 views (last 30 days)
Hi,
We're trying to package a Matlab application as a Windows installer (using Matlab R2021a on Windows 10 64-bit). This all works fine as long as the Windows C++ Redistributable (2015-2019) is installed on the target PC before running the installer. However, if I run it on a clean Windows 10 install which does not have the redistributable packge installed it fails because VCRUNTIME140.dll was no found.
Is there a way to include the redistributable in the installer so that it is installed automatically (as is done with the main Matlab installer), so that we do not have to ask our users to download and install it separately?
For reference, we are using this code to create the installer:
installOpts = compiler.package.InstallerOptions(...
'ApplicationName', 'MyApp', ...
'Version', '0.1.0',
'InstallerName', 'MyAppInstaller', ...
'Shortcut', 'MyAppstandaloneApplication\MyApp.exe', ...
'AuthorName', 'Author', ...
'AuthorEmail', 'author@company.com', ...
'AuthorCompany', 'Company');
compiler.package.installer(buildResults, 'Options', installOpts);
Thanks,
Saajan
  1 Comment
Scott Koch
Scott Koch on 2 Sep 2021
We're seeing the exact same error with Matlab R2020b on Windows 10 64-bit. A solution that doesn't require manually copying the file, as suggested here, is needed.
Thanks
Scott

Sign in to comment.

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!