c#调用.exe程序
using System.Diagnostics; //需要添加这行引用,关于线程的
private void button1_Click(object sender, EventArgs e)
{
string path = @"C:\Program Files\Tencent\QQ\QQ.exe"; //这个path就是要调用的exe程序的绝对路径
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "qq.exe";
process.StartInfo.WorkingDirectory = path;
process.StartInfo.CreateNoWindow =true ;
process.Start();
if (process.HasExited)
{
MessageBox.Show("complete");
}
}
还有其它的可以参考下面的网址
参考资料:http://hi.baidu.com/d369608w/blog/item/6358c752ed90600b0df3e303.html