C#调用bat批处理

1 System.Diagnostics.ProcessStartInfo   Info   =   new   System.Diagnostics.ProcessStartInfo(); 

2                 System.Diagnostics.Process   Proc   =   new   System.Diagnostics.Process(); 

3                 Info.FileName   =   "命令 "; 

4                 Info.Arguments   =   "参数 "; 

5                 Proc   =   System.Diagnostics.Process.Start(Info);
 1 string O15_Branch = " O15Rel";

 2             string O15_Flavor = " x86ret";

 3             string O15_Version = " " + version;

 4             string O15_Lang = " enu";

 5 

 6      System.Diagnostics.ProcessStartInfo   Info   =   new   System.Diagnostics.ProcessStartInfo(); 

 7         System.Diagnostics.Process   Proc   =   new   System.Diagnostics.Process(); 

 8         Info.FileName   =  @"C:\WINDOWS\system32\cmd.exe";

 9         Info.Arguments = @"cmd /c \\trinlab2\BAQAFiles\SharePoint15\BatchFiles\Install_SPTools.bat " +

10             O15_Branch + O15_Flavor + O15_Version + O15_Lang; 

11         Proc   =   System.Diagnostics.Process.Start(Info);

Reference link: http://topic.csdn.net/t/20050805/22/4192089.html

 

你可能感兴趣的:(bat)