Hi all,
I'm trying to call an executable from my VB application, like this:
psi.FileName = "program.exe"
psi.Arguments = sArgs 'sArgs is a string from a text box
psi.WorkingDirectory= "C:\MATLAB6p\bin\newwork\Optimize_subs"
p = Process.Start(psi)
except when I call it, I get this error:
An unhandled exception of type 'System.NullReferenceException' occurred in Project1.exe
Additional information: Object reference not set to an instance of an object.
and the debugger points to the line where the file name is declared.
Is this a program in the executable with the way it's receiving the parameter string, or is the executable not getting called at all, I was thinking maybe a problem with the working directory (yes, the exe is in the right folder). Does anyone know?
Thanks! :)