随笔-84  评论-1136  文章-0  trackbacks-3

C# 调用外部命令行程序

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

 

 

posted on 2009-09-22 15:37 石牌村夫 阅读(199) 评论(0) 编辑 收藏