• C# 执行bat批处理文件


    C# 执行bat批处理文件
     
     1 ///batPath为.bat 可执行文件的绝对路径
     2 private void RunBat(string batPath)
     3 {
     4 Process pro = new Process(); 
     5 FileInfo file = new FileInfo(batPath);
     6 pro.StartInfo.WorkingDirectory = file.Directory.FullName;
     7 pro.StartInfo.FileName = batPath;
     8 pro.StartInfo.CreateNoWindow = True;//隐藏窗体的显示
     9 pro.Start();
    10 pro.WaitForExit();
    11 }
    You can reach me by surfing the web ---- huntjobs.cn,or sending e-mails to me,Here is my qq MailBox:1424870395@qq.com
  • 相关阅读:
    Android随笔
    Android随笔
    阅读笔记
    Android随笔
    Android随笔
    Android随笔
    Android随笔
    Java随笔
    Android随笔
    NC20265 着色方案(dp)
  • 原文地址:https://www.cnblogs.com/HedgehogBlog/p/3376301.html
Copyright © 2020-2023  润新知