zl程序教程

您现在的位置是:首页 >  后端

当前栏目

C# 执行bat批处理文件

c#文件执行 bat 批处理
2023-09-11 14:14:14 时间
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();
}

bat里写的

Resgen.exe  StringResources.zh-cn.txt StringResources.zh-cn.resources