| 123456789101112131415161718192021222324252627282930 | 
							- using System;
 
- using System.Diagnostics;
 
- using UnityEditor;
 
- using UnityEngine;
 
- namespace GFGEditor
 
- {
 
-     public class ProcessUtil
 
-     {
 
-         public static void ExcuteBat(string targetDir, string fileName)
 
-         {
 
-             Process proc = null;
 
-             try
 
-             {
 
-                 targetDir = string.Format(@targetDir);//this is where mybatch.bat lies
 
-                 proc = new Process();
 
-                 proc.StartInfo.WorkingDirectory = targetDir;
 
-                 proc.StartInfo.FileName = fileName;
 
-                 //proc.StartInfo.Arguments = string.Format("10");//this is argument
 
-                 proc.StartInfo.CreateNoWindow = false;
 
-                 proc.Start();
 
-                 proc.WaitForExit();
 
-             }
 
-             catch (Exception ex)
 
-             {
 
-                 UnityEngine.Debug.LogFormat("Exception Occurred :{0},{1}", ex.Message, ex.StackTrace.ToString());
 
-             }
 
-         }
 
-     }
 
- }
 
 
  |