C# 调用外部命令行程序

Code
ProcessmyProcess=newProcess();
ProcessStartInfomyProcessStartInfo=newProcessStartInfo(Server.MapPath("test.bat"));
myProcessStartInfo.UseShellExecute=false;
myProcessStartInfo.RedirectStandardOutput=true;
myProcess.StartInfo=myProcessStartInfo;
//设置不显示窗口
myProcess.StartInfo.CreateNoWindow=true;
myProcess.Start();
myProcess.Close();



posted @ 2013-01-11 10:57  gnhao  阅读(332)  评论(0编辑  收藏  举报