How to add configuration files to standalone matlab application?
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sylvain
am 18 Nov. 2025 um 12:02
Kommentiert: Sylvain
am 18 Nov. 2025 um 14:48
I am stuck at developping my standalone application.
I have a user data file that is called "preferences.toml" it is a typical config file, that is being modified by the user. It cannot be stored on C:\Program Files applications for obvious reasons that it will be modified by the user.
The file will be stored in the APDATA/Roaming/Author Name/App Name, the folder is automatically detected or created. But now I want to copy/paste a default config file.
I attached the file/folder linck to the user_data

But at compilation, the folder is not created

2 Kommentare
Harald
am 18 Nov. 2025 um 13:16
Hi,
are you getting any error messages? To ensure that you observe any error messages, start the executable from a system console rather than by double-clicking it.
Another problem may be that APPDATA/Roaming/Author Name/App Name may not exist on the end user's machines. You can use getenv("USERNAME") to obtain the login name.
If the file is temporary, it might also be an alternative to store it in the folder returned by tempdir.
If the above does not help, it would be great if you can provide a minimal reproduction example.
Best wishes,
Harald
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!