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

22 次查看(过去 30 天)
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 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by