To integrate the installation of the MCR in a custom installer which you want to build for installing your application, we typically recommend simply integrating the provided MCRInstaller.exe in your project and having your installer run this in "silent mode" as part of the installation. Typically, installer toolchains have an option to run some "custom action" or "external command" which should allow you to do this.
The workflow for running MCRInstaller.exe in silent mode is part of the documentation but has changed over time. For MATLAB release prior to R2011b, please refer to:
For MATLAB releases R2011b and newer, see:
Further, as an alternative for using the MCRInstaller in silent mode, for MATLAB releases R2007a to R2017a we can offer a MSM Merge Module for the MCR which you can integrate into your installer project if your toolchain does indeed support these. To obtain such a Merge Module please contact MathWorks Technical Support: