c#执行批处理

来源:互联网 发布:淘宝上的爱奇艺会员 编辑:程序博客网 时间:2024/05/18 03:21
private void RunBat(string batPath)        {            Process pro = new Process();            FileInfo file = new FileInfo(batPath);            pro.StartInfo.WorkingDirectory = file.Directory.FullName;            pro.StartInfo.FileName = batPath;            pro.StartInfo.CreateNoWindow = false;            pro.Start();            pro.WaitForExit();        }

0 0
原创粉丝点击