AppDesigner Packaging Data Files Location
이전 댓글 표시
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
Mario Malic
2022년 10월 27일
편집: Mario Malic
2022년 10월 27일
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
2022년 10월 27일
Mario Malic
2022년 10월 27일
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
2022년 10월 27일
답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!