日期:2014-05-20  浏览次数:20844 次

连接.exe文件!急急急
我双击mysolver.exe文件,可以得到正确的结果,   可是我用下列程序连接mysolver.exe这个文件,
Process.Start( "C:/Inetpub/wwwroot/Webinterface/bin/Release/mysolver.exe ");
就报错!
An   exception   'System.NullReferenceException '   has   occured   in   mysolver.exe
请问高手有可能哪里出问题了,请指教!

谢谢了(不是路径的问题!)

------解决方案--------------------
Process p2 = new Process();
p2.StartInfo.FileName = "mysolver.exe ";
p2.StartInfo.Verb = "Open ";
p2.StartInfo.WorkingDirectory = @ "C:/Inetpub/wwwroot/Webinterface/bin/Release ";
// p2.StartInfo.UseShellExecute = false;
// p2.StartInfo.RedirectStandardInput = true;
// p2.StartInfo.RedirectStandardOutput = true;
// p2.StartInfo.CreateNoWindow = true;
p2.Start();