title: MATLAB how to set the path before running an executable
body: <p>When the executable runs I'm trying to make it access another folder saved on my flash drive. I have tried adding addpath() before the script but that doesn't work. I am trying to make the executable search for the mcr folder I have installed on my flash drive before running the main project. So far it keeps crashing trying to search for the runtime folder.</p>
  
  <p>Error</p>
  
  <pre><code>Could not find version 9.0.1 of MATLAB Runtime.
  Attempting to load mclmcrrt9_0_1.dll.
  Please install the correct version of the MATLAB Runtime. Contact your vendor if you do not have an installer for the MATLAB Runtime.
  </code></pre>
  
  <p>I understand that when you install the MATLAB Runtime it installs in the C Drive. But I installed it on my flash drive. So that when I used different PC's I didn't have to install the runtime every time. But every time I use a different PC that error always shows. So I'm trying to set the PATH in my executable so that it will always know to find the Runtime folder on my flash drive.</p>