Matlab Runtime Compiler creates the .m files in the mcrCache
Show older comments
Dear community,
I created .exe files to deploy my .m files and share them to users outside my lab.
I used previously the 9.2 version but now I'm using the recent one (9.12).
In the cache folder ("C:\Users\useranme\AppData\Local\Temp\useranme\mcrCache9.12\), there are a lot of /m files created now for each executable launch.
I'm wondering if these files can be automatically deleted after the call?
I'm also want to be sure that these files do not share the code because it is confidential.
Best regards,
Sébastien
8 Comments
Bruno Luong
on 25 Jul 2022
Have you notice that the mfile content is encrypted?
Sébastien MAILFERT
on 25 Jul 2022
Bruno Luong
on 25 Jul 2022
Edited: Bruno Luong
on 25 Jul 2022
I'm not awared any protection system that cannot be hacked.
But how deleting the files after run can reinforce the safety? It's so easy to make a copy of it.
May be -s option with an additional layer will make you think you are safer.
Sébastien MAILFERT
on 25 Jul 2022
Bruno Luong
on 25 Jul 2022
Edited: Bruno Luong
on 25 Jul 2022
Simply because it has to decrypt and expland into the cache folder everytime you run the code.
If you leave it there it do not need to do this two steps everytime. Just forget about the idea of deleting the cache, it hurts the execution without raise any significant level of protection.
Sébastien MAILFERT
on 25 Jul 2022
Bruno Luong
on 25 Jul 2022
I don't know, I use mcc commmand to build by app, and adding -s option is just straight forward.
Sébastien MAILFERT
on 26 Jul 2022
Edited: Sébastien MAILFERT
on 26 Jul 2022
Answers (1)
Walter Roberson
on 25 Jul 2022
1 vote
Starting in R2021b, you can obscure the names of files and the directory structure, and also encrypt other file types (such as MAT, FIG, MEX, and so on) using the -s option for mcc (MATLAB Compiler). At run time, the encrypted files remain encrypted on the disk but are decrypted in memory to what they originally were before compiling.
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!