Changing the start folder for compiled standalone app

조회 수: 4 (최근 30일)
Riccardo Barilli
Riccardo Barilli 2020년 11월 2일
댓글: Christian Hermann 2023년 6월 12일
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

채택된 답변

Rishik Ramena
Rishik Ramena 2021년 3월 19일
Have a look at this answer. You would need to add the required parts of this code to the OpeningFcn() of your application.
  댓글 수: 1
Christian Hermann
Christian Hermann 2023년 6월 12일
The solution there only works for normal shortcuts. For shortcuts created through the installer the problem is still there...

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by