AppDesigner Packaging Data Files Location
Mostra commenti meno recenti
Packaged an EXE with MATLAB Compiler -- on install, accepted default location and let it put a shortcut on the desktop.
That went ok, but the datafile associated with the application it uses to save the previous state on restart was also placed on the desktop and so isn't being found.
How do you make it put the datafile in the same location as the executable on install. I've a problem here that I don't have administrator rights so can't just move it myself without calling in IT.
5 Commenti
Mario Malic
il 27 Ott 2022
Modificato: Mario Malic
il 27 Ott 2022
What about writing into the user account folder (tested on Windows, I don't know what's up with other OSs)?
C:\Users\%USERNAME%\
You can write to the documents, pictures and music sub folders, AppData\Roaming or AppData\Local\ etc...
getenv("APPDATA")
getenv("LOCALAPPDATA")
getenv("USERPROFILE")
dpb
il 27 Ott 2022
Mario Malic
il 27 Ott 2022
What I ment is to modify the code in the app to save/edit/look for the internal data file in one of the mentioned environment variables (I assume that user doesn't need admin rights to play with the files in those folders).
dpb
il 27 Ott 2022
Risposte (1)
dpb
il 29 Ott 2022
0 voti
Categorie
Scopri di più su Introduction to Installation and Licensing in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!