MATLAB Answers


How do I deploy my compiled stand-alone application on a network drive so that it can be accessed by all network users without having to install MATLAB Compiler Runtime (MCR) on all client computers?

I have compiled a stand-alone application that I would like to put on a network drive so that it can be accessed by all network users. I would like to do this without having to install MATLAB Compiler Runtime (MCR) on every client computer on the network.

2 Answers

Answer by MathWorks Support Team on 14 Aug 2015
 Accepted Answer

This information has been added to the Documentation for MATLAB Compiler 4.2 (R14SP2). The documentation for R14SP2 is available here:
User's Guide (MATLAB Compiler) -> Deployment Process -> Deploying a Standalone Application on a Network Drive
Documentation link for R2015a is available here:
If you are using a previous version, read the following:
Documentation on how to install the MCR on a network drive is missing from the MATLAB Compiler manual. Here is additional information:
Execute MCRInstaller.exe to install MATLAB Compiler Runtime (MCR) on a machine. For installation instructions in the R14SP2 documentaion, refer to:
User's Guide (MATLAB Compiler) -> Deployment Process -> Working with the MCR
For R2015a documentation links:
For installing MCR:
For MCR path settings:
1. Copy the resulting MCR directory (the directory where MCR is installed) onto a network drive.
2. Copy the compiled application directly into the directory $MCR\$VERSION\runtime\$ARCH (where $MCR is the root or your MCR installation, $VERSION is the version of your MCR installation, and $ARCH is your system's architecture). Alternatively, copy the compiled application into any directory in the network drive, and add $MCR\$VERSION\runtime\$ARCH to the system path (not the MATLAB path) on all the client machines. Be sure to copy the CTF-file as well as the executable file.
3. Install the Microsoft Visual C++ Redistributable Package (vcredist_x86.exe).
All network users will then be able to execute the application.
If you are using either MATLAB Builder for COM or MATLAB Builder for Excel, instead of copying the executable file, you will copy the DLL-file along with the CTF-file. You will then need to register the following DLLs on every client machine.
by using the following command at your DOS prompt
regsvr32 <dllname>
These DLLs are in $MCR\$VERSION\runtime\$ARCH


Thanks Support Team. For the inept of us out here, could you please explain how to "...add the path $MCR\$VERSION\runtime\$ARCH to all the client machines." I would have thought you'd do that within the MATLAB environment, but the point of the exercise is so that network users can run your routines without MATLAB installed.
Good catch, Stephen. The path that this article refers to is your system path, not your MATLAB path. The article should have made this clearer, so we have revised it accordingly. As for modifying your system path, that procedure will vary depending on your OS and your security settings, and so it is best to speak with your IT staff if you have questions about that.

Sign in to comment.

Answer by Javier Paredes on 13 Mar 2014

I don't understand why we don't have the capability of placing the mclmcrrt#_#.dll file on a network drive and simply point our application to it. We do this at our company for other Java libraries by adding the network drive folder with the required DLL files to the java.library.path variable.
This way we could maintain and upgrade the .dll's if we compile the Matlab applications with newer versions of Matlab ourselves. The way it works now, I'm going to have to ask all of our software users to install MCR on their machines and anytime I upgrade Matlab I will have to ask them to do it again.
This could easily be fixed by adding code to the MCRConfiguration class in the javabuilder library that also looks in the java.library.path for the required .dll files.

  1 Comment

Thanks for your feedback, Javier. I have passed this suggestion along to the MCR developers.

Sign in to comment.