调用批处理

来源:互联网 发布:淘宝客分佣cms系统 编辑:程序博客网 时间:2024/06/14 01:32
 
           using System.Diagnostics;     //要加上这个命名空间       
           ...................
            Process p 
= new Process();
            
string path = HttpContext.Current.Request.PhysicalPath;
            
string file = path.Substring(0, path.LastIndexOf("/"+ 1+ @"命令.bat";
            p.StartInfo.FileName 
= file;
            p.StartInfo.CreateNoWindow 
= true;
            p.Start();
原创粉丝点击