C#调用exe程序
时间:2020-05-02 11:59:20
收藏:0
阅读:68
private void ExecCheckExe()
{
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();
}
}
评论(0)