日期:2014-05-18 浏览次数:21012 次
Process myProcess = new Process(); myProcess.StartInfo.FileName =Application.StartupPath+"lo.exe"; myProcess.Start();
------解决方案--------------------
lo.exe的main函数必须传入某个参数
main(string[] info)
{
if(info!=null)
{
if(info[0]=="aaa")//专用判断数据
//运行
}
return;//退出了
}
在main.exe处调用的时候
Process myProcess = new Process();
myProcess.StartInfo.FileName =Application.StartupPath+"lo.exe";
myProcess.StartInfo.Arguments="aaa";//专用判断数据
myProcess.Start();
随便一写,不一定能运行。最好是翻看一下msdn关于process的说明。