MATLAB: Could not access the MCR component cache Error

accesscomponent cacheMATLAB Compilermcr

Im getting an error where the command window closes immediately after I click on an executable file developed using Matlab. The error message reads "Could not access the MCR component cache". I am using a pre-packaged executable and MCR on 64bit Windows (the MCR version is correct). The executable was working fine but suddenly stopped working yesterday after I closed-restarted it a few times. I reinstalled the MCR but it gives me the same error.
I am a novice in Matlab so any ideas are much appreciated.

Best Answer

Not sure, but could it be that the extracted CTF archive somehow got corrupted? I think it is usually extracted to C:\user_name\AppData\Local\Temp\userid\mcrCachen.nn (where the 'n' stands for a number). If you can find the file, perhaps you can delete it and run your executable again to see if it is regenerated. If you can't find it, you could try deleting the files in your Temp folder (usually C:\user_name\AppData\Local\Temp\) and try again.