C# 执行bat文件

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();
}

C# 执行bat文件

上一篇:java_manual的一点体会


下一篇:在Linux上运行C#