Changing the start folder for compiled standalone app
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Riccardo Barilli
am 2 Nov. 2020
Kommentiert: Christian Hermann
am 12 Jun. 2023
After a standalone packaging, when I install the app in Windows Environment (asking for shortcut on desktop) and I launch the app from the shortcut, the "working" path seems to be the desktop.
For example, the log file is created in the desktop with other files I need to create during the startup. I know how to get the path of ctfroot and the exe folder, but is there a way to change the path in which the app works?
Actually it seems that the app works in the pwd path because when I try the command in the compiled app the result is the desktop path.
Thank you
0 Kommentare
Akzeptierte Antwort
Rishik Ramena
am 19 Mär. 2021
Have a look at this answer. You would need to add the required parts of this code to the OpeningFcn() of your application.
1 Kommentar
Christian Hermann
am 12 Jun. 2023
The solution there only works for normal shortcuts. For shortcuts created through the installer the problem is still there...
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!