System.Diagnostics.Process 提供对本地和远程进程的访问并使您能够启动和停止本地系统进程。
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
//proc.StartInfo.FileName = "calc";
//proc.StartInfo.FileName = "notepad";
//proc.StartInfo.FileName = "mspaint";
proc.StartInfo.FileName = @"C:/Program Files/金山词霸2007/xdict.exe";//可以直接用路径打开程序
proc.Start();
if(MessageBox.Show("是否关闭","提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Information)==DialogResult.OK)
proc.Kill();
//关闭IE的方法
System.Diagnostics.Process[] myProcesses = System.Diagnostics.Process.GetProcesses();
foreach(System.Diagnostics.Process myProcess in myProcesses)
{
if (myProcess.ProcessName.ToUpper