Include Microsoft C++ redistributable with application installer?

11 次查看(过去 30 天)
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 个评论
Scott Koch
Scott Koch 2021-9-2
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

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by