It is possible to install a program written and compiled in MATLAB in silent mode by specifying the -mode option and -agreeToLicense yes on the command line as below:
setup -mode silent -agreeToLicense yes
For example, if you have a standalone application that you want to execute in silent mode, do the following:
1.Navigate to the for_redistribution folder of the compiled application where you would find the installer 'MyAppInstaller_web' in operating system command line.
2.Execute the below command in command line:
MyAppInstaller_web.exe -mode silent -agreeToLicense yes
Refer the below link for more information:
https://www.mathworks.com/help/compiler_sdk/cxx/install-the-matlab-runtime.html