1、
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();
}
2、
System.Diagnostics.Process.Start(@str);
为什么有的执行文件用第一种方法可以正常打开,用第二种方法就直接显示停止工作