From: David on
I am trying to set the startup directory for MatLab when I create a new instance in code (from .Net calling into a c wrapper). I need to be able to use a java.opts file and a startup.m file that are located in this startup directory. I have been calling the startup file manually with endEvalString but miss the java.opts and it would be cleaner to emulate the actions of MatLab.

I need to set the startup directory and I believe I am not able to send a statcmd to engOpen in the windows environment. How can I set the startup directory from code?

I need to simulate a .bat file currently used to launch MatLab which does this:

C:\MATLAB2008a\bin\matlab.exe -sd x:\software\bat\startup_2008a_windows

Thanks!
David