C#调用exe程序
2021-03-07 19:29
标签:shel als output ecc out and stand exist for private void ExecCheckExe() C#调用exe程序 标签:shel als output ecc out and stand exist for 原文地址:https://www.cnblogs.com/jiftle/p/12817207.html
{
string exefile = "d:\\chktool\\checktool.exe";
if (File.Exists(exefile))
{
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo(exefile);
startInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;
startInfo.CreateNoWindow = true;
process.StartInfo = startInfo;
process.Start();
process.WaitForExit(2000);
string output = process.StandardOutput.ReadToEnd();
process.Close();
}
}
上一篇:Windows环境变量配置与读取