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

10 views (last 30 days)
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?

Accepted Answer

Image Analyst
Image Analyst on 13 Mar 2015
Yes. See my attached function. Call it in the startup code of your app.
  6 Comments

Sign in to comment.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!