Changing the start folder for compiled App shortcut (Matlab 2014a)

조회 수: 7 (최근 30일)
Michael
Michael 2015년 3월 13일
댓글: HAO WU 2023년 10월 26일
Using the Standalone Application compiler in Matlab 2014a you can add files to installed with your application. I have added a few files to this section that are subject to manual changes depending on what tasks the end user might want to perform with the program and to handle driver installations. I have noticed that when running the MCR installer that is created for the application that it will asks the user if they would like to create a shortcut to the desktop for the application.
Once the program has been installed if you run it using the shortcut created by the installer it starts in is the local desktop folder so any of the files that are in the application folder cannot be seen by the program because it is not part of the path. But if I manually create a shortcut by going to the installed exe file and send it to desktop as a shortcut when I run the program using that shortcut the program will start in application folder that was created by the installer.
My question is this, is there a way to to either check to see where the program is installed so I can change my directory to be in the correct location or make i so the the shortcut created by the mcr installer will have the program boot in the installed folder?

채택된 답변

Image Analyst
Image Analyst 2015년 3월 13일
Yes. See my attached function. Call it in the startup code of your app.
  댓글 수: 6
HAO WU
HAO WU 2023년 10월 26일
Great answer! Thank you my hero

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

추가 답변 (0개)

카테고리

Help CenterFile 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!

Translated by