MATLAB: Windows executable works in cmd but not using Matlab system() oder dos() functions

dossystem

I am tying to run a program (FCEA2.exe) from Matlab. When I enter the command line in Windows using cmd (running as admin), it works perfectly fine using
R:\FCEA2
However, when I try using
dos('R:\FCEA2')
in Matlab (running Matlab as admin) I get this error:
At line 3455 of file cea2.f (unit = 14, file = 'thermo.lib')
Fortran runtime error: End of file
The same thing happens using system() instead of dos(). I get the same problem when I force Windows to use my own user account via runas in cmd, even though I have admin privileges. I am using Windows 7 and the academic version of Matlab 2015a. Does anyone know a way to solve this problem?

Best Answer

Alright, I finally found some time to work on this problem again. I tried the dependency walker and indeed got some missing libraries, but according to a google search that is apparently a problem within the dependency walker tool itself.
I decided to try something I had not tested before: Instead of running the exe itself, I created a shortcut to it (named FCEA.lnk) and executed this shortcut using
start "FCEA" /b /wait FCEA.lnk
as the command to Windows from MATLAB. /b tells it to not open a new command window, /wait to only return once the process is done (otherwise MATLAB will continue without waiting for CEA to finish). While this seems like a pretty ugly hack, it works very well so far. I would be very glad if someone could tell me why though :)
Anyways, thanks for the comments!