读书人

连接.exe文件!该怎么解决

发布时间: 2012-01-23 21:57:28 作者: rapoo

连接.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();

读书人网 >C#

热点推荐