代码如下:
已测试可用
string targetDir = string.Format(@"D:\data\");
Process proc = new Process();
proc.StartInfo.WorkingDirectory = targetDir;
proc.StartInfo.FileName = "1.bat";
proc.StartInfo.Arguments = string.Format("10");
proc.StartInfo.CreateNoWindow = false;
proc.Start();
proc.WaitForExit();
学习了