c# 关QQ
程序如下
private void button1_Click(object sender, EventArgs e)
{
Process process = new Process();
process.StartInfo.FileName = @"c:\ProgramFiles\Tencent\QQ\Bin\QQ.exe"; //"输入完整的路径"
process.StartInfo.Arguments = "QQ.exe"; //启动参数
process.Start();
}
运行完后,QQ登陆界面弹开了,我想用C#语言关掉怎么关啊!
------解决方案--------------------
Process.Start("taskkill.exe", @"/F /T /IM QQ.exe");
其实就是用cmd命令,taskkill /f /im qq.exe