Well, I guess this is not a show stopper as I'm getting the program itself compiled, so I'll just use that instead
Installer deployment from standalone
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Tero
el 10 de Nov. de 2023
Respondida: Akanksha
el 13 de Jun. de 2025
Hi all,
I have made a standalone (remoteLicenseGen.exe), which compiles a new exe file by using the mcc command. This works fine. However, I'm having trouble in getting the standalone to compile me the installer file of this newly compiled exe.
I'm using the compiler.package.installer for the installer creation. Running the whole script from Matlab works fine, and the script first compiles the program itself, and then creates the installer just fine. However, after I turn the script into this standalone, and run it, it throws an exception at the line of compiler.package.installer. The error is as follows:

Any ideas what to do? Any other method for the installer creation than what I've used?
Thanks,
Tero
Respuesta aceptada
Akanksha
el 13 de Jun. de 2025
The error occurs because the “ compiler.package.installer” function depends on internal MATLAB components that are nt included in the MATLAB Runtime (MCR). When you run your script inside MATLAB, it has access to all the necessary files and databases. But when you compile it into a standalone .exe, it runs using the MCR, which is a lightweight version of MATLAB meant only for running compiled applications—not for development or packaging tasks.
Specifically, the error message shows that a required internal database file is missing:
Database file ...\pcm\win64\db?mode=ro not found
This confirms that the installer packaging tools are not supported in standalone mode.
The workaround could be to Use External Installer Tools, after the standalone app generates the .exe or split the workflow into two parts:
Step 1: Let App Just Build the Program
The standalone app (remoteLicenseGen.exe) should focus on taking the MATLAB code and turning it into a .exe file. This part is already working well for you, so no need to change anything here.
Step 2: Make the Installer Using MATLAB (Not the App)
Once the .exe is ready, open MATLAB itself (not the standalone app) and run a small script that tells MATLAB to wrap the .exe into an installer.
This step must be done inside MATLAB, because the installer tool needs special internal files that aren’t included in the free MATLAB Runtime (which the standalone app uses).
Attached are the R2022b documentation links along with the subsection that will help you with the above mentioned process :
https://www.mathworks.com/help/releases/R2022b/compiler/compiler.package.installer.html?searchHighlight=compiler.package.installer&s_tid=doc_srchtitle - Create Installer Using Results Object (This section shows how to use the compiler.package.installer(results) function inside MATLAB after building the application with compiler.build.standaloneApplication.)
https://www.mathworks.com/help/releases/R2022b/compiler_sdk/matlab_code.html?searchHighlight=Package+MATLAB+Functions&s_tid=doc_srchtitle - Functions Not Supported for Compilation by MATLAB Compiler and MATLAB Compiler SDK
Hope this helps!
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!