One thing to remember is that if you load() or imread() a file using a pathname that is not an absolute pathname, then in a standalone executable, the first place that it is going to check for the file is ctfroot(), and it will check there before looking at the MATLAB path. Therefore if you have read-only files and folders you can add them to the project and use them as-if they are in your current directory. If you need to write temporary files use tempdir() and tempname(); if you need to write permanent files then you start running into difficulty.
2 Comments
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/287359-standalone-exe-how-to-change-uigetdir-to-avoid-the-dependency-of-the-path#comment_370662
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/287359-standalone-exe-how-to-change-uigetdir-to-avoid-the-dependency-of-the-path#comment_370662
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/287359-standalone-exe-how-to-change-uigetdir-to-avoid-the-dependency-of-the-path#comment_371116
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/287359-standalone-exe-how-to-change-uigetdir-to-avoid-the-dependency-of-the-path#comment_371116
Sign in to comment.