I have a couple questions about creating desktop shortcuts to run an mfile.
I would like to create a desktop shortcut that when clicked will run the mfile (not just open it). In addition to this, I would like to be able to distribute the mfile to others and still have the shortcut work. I am having lots of problems with getting the "relative path" required for the shortcut to work.
The two areas I need help with is:
1. (Most Important) Having other people be able to use my shortcut. Right now, I can put my shortcut anywhere on my computer and it will work fine. The problem is that when another person tries to use the shortcut, it points to the directory that was on my computer. I looked online extensively and realized I think this is really complex, maybe not with MATLAB, but at least with other directories. Ideally I think we just need to make a relative path from where the shortcut is located (this stays constant) but I think that is harder to do than you would initially think.
2. Assuming I can get the above working, I would like to set the default action of the shortcut to run the mfile, not just open it up in the editor. I am assuming this would involve a command line process, but I am open to any ideas or suggestions.
I have a feeling my ending solution will involve creating a shortcut to a .bat file which is OK, I am just not very familiar with DOS commands and what not so would probably need some extra guidance if that indeed is the solution.
Thank you in advance for your help!