实现方法: private static void RunBat(string program, string parm) { try { Process proc = new Process(); proc.StartInfo.FileName = program; proc.StartInfo.Arguments = string.Format(parm);//this is argument proc.StartInfo.UseShellExecute = false; proc.StartInfo.CreateNoWindow = true; proc.Start(); proc.WaitForExit(); } catch (Exception ex) { Console.WriteLine("Exception Occurred :{0},{1}", ex.Message, ex.StackTrace.ToString()); } } //svn update: RunBat("TortoiseProc", string.Format($"/command:update /path:{"更新的路径(绝对路径|相对路径都可)"} /closeonend:3")); //svn commit RunBat("TortoiseProc", string.Format($"/command:commit /path:{"更新的路径(绝对路径|相对路径都可)"} /closeonend:3"));