详细说明:
1.winform 我在程序启动的时候要调用一个外部的exe,请问这个exe文件我应该放在什么地方?
2.winform 如何调用这个外部的exe(可执行文件);
3.我的winform程序,在退出的时候如何直接关闭exe对应的线程?
1.winform 我在程序启动的时候要调用一个外部的exe,请问这个exe文件我应该放在什么地方?
2.winform 如何调用这个外部的exe(可执行文件);
3.我的winform程序,在退出的时候如何直接关闭exe对应的线程?
Process p = new Process();
p.StartInfo.WorkingDirectory = dir;
p.StartInfo.FileName = "cmd";
p.StartInfo.Arguments = @"/c ";
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.Start();
p.Close();