| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB Compiler |
| Contents | Index |
| Learn more about MATLAB Compiler |
If you distribute your compiled components to users who do not have MATLAB installed on their systems, they must install the MATLAB Compiler Runtime (MCR). To install the MCR, users of your component must run the MCR Installer for their platform: MCRInstaller.exe for Windows systems and MCRInstaller.bin for UNIX and Linux systems. (The MathWorks uses a different MCR installation program on Macintosh systems.)
The MCR Installer supports command line options that can be helpful in certain instances. For example, if you want to automate installation of the MCR for users of your component, you might want to run the MCR Installer in silent mode, where no interaction with the user is required. To accomplish this, you must use MCR Installer command line options. The following sections describe some commonly used command line options for Windows, UNIX, and Linux systems.
Use the mcrinstaller command to display information about the location of available MCR installers on your system. See the Function Reference for more information about using this command.
The following table lists some frequently used command line options for the MCR Installer on Windows systems (MCRInstaller.exe). The MCR installer is implemented using both an InstallShield wizard and the Windows Installer tool, Msiexec.exe. Both installers support command line options and you can specify these options on the MCR installer command line. To specify Msiexec command line arguments, you must use the InstallShield /v argument. For more information about these tools, see the appropriate documentation from their vendors: InstallShield (the Basic MSI project options only) and Msiexec.exe. Examples of using these command line options follow.
Frequently Used MCR Installation Options on Windows Systems
| Option | Description |
|---|---|
| /a | Performs installation as an administrator. This option is useful
if you want to uncompress the installation so you can extract the
MSI install and repackage it with your options. The /a option requires Windows Administrator access. |
| /Ldecimal_language_ID | Specifies the language (decimal_language_ID) to be used by a multi-language installation program. |
| /n | Runs without a GUI. This is an Msiexec.exe option that must be passed using the /v option. |
| /q | Runs in quiet mode. This is an Msiexec.exe option that must be passed using the /v option. |
| /s | Runs the installation in silent mode. There must be a space after /s. |
| /v | Pass command-line options and values of public properties to Msiexec.exe. Make sure there is no space after /v. Also, you can use double quotation marks (" ") to delimit the arguments to /v, but you still cannot have a space between /v and the enclosing quotation marks. |
| /x | Uninstall the MCR. |
| /w | Wait until the installation is complete before exiting. |
To perform a silent installation, you must use the /s option, to suppress the InstallShield wizard, and specify the /q and /n options to suppress the Msiexec GUI. In the following example, you must use the /v option to pass the Msiexe options, and there is no space between the /v and the quotation mark that encloses the Msiexec options. The example specifies the folder where you want to install the MCR. You only need to specify this if you don't want to use the default installation folder:matlabroot\MATLAB Compiler Runtime\mcrversion, where matlabroot is the root folder for the MATLAB installation and mcrversion is the version number of the MCR. The example also specifies the language, using the /L option
MCRInstaller.exe /L1033 /s /v"/qn INSTALLDIR=D:\MCR\release"
By using the /w option, you can initiate the MCR installer without blocking the command prompt. The is useful for silent installations.
To block the command prompt:
start /WAIT MCRInstaller.exe /w
To perform a silent install from a script and block command prompt:
start /WAIT MCRInstaller.exe /w /s /v/qn
To perform a silent uninstall from a script and block command prompt:
start /WAIT MCRInstaller.exe /w /x /v/qn
The following command causes the installer to create a verbose log of the install process in C:\log.txt. For information about the Msiexec options passed with /v, see the Msiexec documentation.
MCRInstaller.exe /v"/L*v \"C:\log.txt\""
.
The following table lists some frequently used command line options for the MCR Installer on UNIX and Linux systems (MCRInstaller.bin). The MCR Installer on UNIX and Linux systems is implemented using the InstallShield Universal Java installer. The universal installer supports two types of command line options: installation launcher options and run-time options. You can specify any mix of these options on the MCR Installer command line. If you extract the Jar file from the installation launcher (using installation launcher options) and call it directly, you must use the run-time options. Examples of using these command line options follow.
Frequently Used MCR Installer Options on UNIX or Linux Systems
| Option | Description |
|---|---|
| -cp:a <classpath> | Appends (add to the end) <classpath> to the launcher's classpath. |
| -cp:p <classpath> | Prepends (add to the beginning) <classpath> to the launcher's classpath |
| -is:extract | Extracts the contents of the archive. |
| -is:help | Displays command line option help text and exits. |
| -is:log <filename> | Specifies file in which to write debug messages. |
| -log | Specifies file in which to write debug messages (run-time version) |
| -is:nospacecheck | Turns off launcher disk space checking. |
| -P | Specifies properties of a product bean, such as the bean ID. |
| -is:silent | Prevents the display of the application launcher UI. To run in silent mode, use the -silent run-time option. |
| -silent | Specifies to install or uninstall the product in silent mode, where the installation/uninstallation is performed with no user interaction. |
| -is:tempdir <dir> | Specifies the temporary folder to be used by the launcher. |
To remove an MCR installation on UNIX systems, run the uninstaller.bin program.
It is important to run the uninstaller, rather than just removing the MCR installation folder using the rm command, because an MCR installation affects other aspects of your environment. For example, the MCR installer creates a folder named InstallShield in your UNIX home folder that stores information about your particular MCR installation. When you use the MCR uninstaller, it removes some of these additional folders.
To run the MCR uninstaller, follow this procedure:
Navigate to your MCR installation folder using the cd command.
cd into the _uninst folder
Run the uninstaller.bin program. If you want to run the uninstaller noninteractively, specify the -silent option on the command line.
The MathWorks includes the JRE required by the MCR Installer. However, your Linux system might not support this version of the JRE. To work around this issue, you can extract the Jar file from the MCR installer (MCRInstaller.bin) and call the Jar file directly, using the JRE that works with your system. The following provides a step-by-step instructions.
Extract the Java Jar file from the application launcher, using the is:extract installation launcher option.
MCRInstaller.bin -is:extract
This option extracts the components, including the Jar filesetup.jar.
Run the Jar file using the JRE that works with your system.
java -jar setup.jar
This starts the installer GUI.
To perform a noninteractive (silent) installation, you must use the -silent run-time option. This example also uses the -P option to specify a particular Java bean.
MCRInstaller.bin -P bean421.installLocation="desiredInstallPath" -silent
![]() | MATLAB Compiler Licensing | Function Reference | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |