C# 如何执行bat文件 传参数

    Process p = new Process();  
    string path = ...;//bat路径  
    ProcessStartInfo  pi= new ProcessStartInfo(path, ...);//第二个参数为传入的参数,string类型以空格分隔各个参数  
    pi.UseShellExecute = false;  
    pi.RedirectStandardOutput = true;  
    p.StartInfo = pi;  
    p.Start();  
    p.WaitForExit();  
    string output = p.StandardOutput.ReadToEnd();  
    echo %1  %2  %3  
    pause  
原文地址:https://www.cnblogs.com/jimcsharp/p/5329735.html