zoukankan      html  css  js  c++  java
  • c#调用Dos命令(超捷)

      string[] cmd = new string[] { @"cd C:\Program Files\华光科技\超捷网络4.2", "YJClient.exe $StartFromXinWen$ admin 00" };
                    Process p = new Process();
                    p.StartInfo.FileName = "cmd.exe";
                    p.StartInfo.UseShellExecute = false;
                    p.StartInfo.RedirectStandardInput = true;
                    p.StartInfo.RedirectStandardOutput = true;
                    p.StartInfo.RedirectStandardError = true;
                    p.StartInfo.CreateNoWindow = true;
                    p.Start();
                    p.StandardInput.AutoFlush = true;
                    for (int i = 0; i < cmd.Length; i++)
                    {
                        p.StandardInput.WriteLine(cmd[i].ToString());
                    }
                    p.StandardInput.WriteLine("exit");
                    string strRst = p.StandardOutput.ReadToEnd();
                    p.WaitForExit();
                    p.Close();
  • 相关阅读:
    后缀自动机在复习
    冬令营模拟day2总结
    割点(模板)
    黑匣子
    挤牛奶
    上白泽慧音
    lca最小公共祖先祖先
    最小花费
    牛的旅行(标程)
    骑马修栅栏
  • 原文地址:https://www.cnblogs.com/zhwl/p/2030801.html
Copyright © 2011-2022 走看看