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();
  • 相关阅读:
    asp.net 自定义文本框
    单机运行k8s以及e2e
    编译k8s1.3的代码
    etcd的简单使用
    How Tencent Tests Software
    ps引发的血案
    配置IDE查看kubernetes源码
    读书笔记<<不懂带人,你就自己干到死>>
    书摘<<互联网世界观>>
    读书笔记《异类》
  • 原文地址:https://www.cnblogs.com/zhwl/p/2030801.html
Copyright © 2011-2022 走看看