首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

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

2012-01-23 
连接.exe文件!急急急我双击mysolver.exe文件,可以得到正确的结果,可是我用下列程序连接mysolver.exe这个文

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

热点排行