/// <summary>
/// 代码执行
/// </summary>
/// <param name="batName"></param>
public static void RunBat()
{
Process proc = null;
string targetDir = "Assets/../../../../bats/";//this is where mybatch.bat lies
try
{
proc = new Process();
proc.StartInfo.WorkingDirectory = targetDir;
proc.StartInfo.FileName = "xxx1.bat";
proc.StartInfo.CreateNoWindow = false;
proc.Start();
proc.WaitForExit();
proc.StartInfo.FileName = "xxx2.bat";
proc.StartInfo.CreateNoWindow = false;
proc.Start();
proc.WaitForExit();
proc.StartInfo.FileName = "xxx3.bat";
proc.Start();
proc.WaitForExit();
}
catch (Exception ex)
{
UnityEngine.Debug.LogError($"Exception Occurred :{ex.Message},{ex.StackTrace.ToString()}!");
}
}
相关文章
- 01-15在FreeBSD中运行python脚本作为cron作业
- 01-15ROS launch文件的使用(同时打开多个终端运行)
- 01-15使用Python在同一进程中运行三个命令
- 01-15如何在Windows 8应用程序中使用c#添加facebook rss feed?
- 01-15appium解决运行脚本报错A JNI error has occurred,please check your installation and try again
- 01-15java -jar命令运行jar包时指定外部依赖jar包 linxux or windows
- 01-15IDEA如何打包可运行jar,外部引用jar包版
- 01-15目标跟踪:C-COT和ECO代码配置运行以及错误解决方法
- 01-15windows环境里React-Native运行失败的原因之一,缺少依赖
- 01-15OpenGL程序运行提示glut32.dll丢失问题