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?
15 views (last 30 days)
Show older comments
MathWorks Support Team
on 9 Feb 2011
Edited: MathWorks Support Team
on 15 Oct 2020
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.
Accepted Answer
MathWorks Support Team
on 5 Oct 2020
Edited: MathWorks Support Team
on 15 Oct 2020
This information has been added to the Documentation for MATLAB Compiler. The documentation is available here:
User's Guide (MATLAB Compiler) -> Deployment Process -> Deploying a Standalone Application on a Network Drive
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, refer to:
User's Guide (MATLAB Compiler) -> Deployment Process
For 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.
mwcommgr.dll
mwcomutil.dll
by using the following command at your DOS prompt
regsvr32 <dllname>
These DLLs are in $MCR\$VERSION\runtime\$ARCH
2 Comments
Scott
on 15 May 2014
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.
-Scott
More Answers (1)
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
Scott
on 29 May 2014
Thanks for your feedback, Javier. I have passed this suggestion along to the MCR developers.
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!