AppDesigner Packaging Data Files Location
Mostrar comentarios más antiguos
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 comentarios
Mario Malic
el 27 de Oct. de 2022
Editada: Mario Malic
el 27 de Oct. de 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
el 27 de Oct. de 2022
Mario Malic
el 27 de Oct. de 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
el 27 de Oct. de 2022
Respuestas (1)
dpb
el 29 de Oct. de 2022
0 votos
Categorías
Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!