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  

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2021-11-19
  • 2022-03-04
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-25
  • 2022-12-23
相关资源
相似解决方案