private void KillProcess(string processName)
{
System.Diagnostics.Process myproc = new System.Diagnostics.Process();
//得到所有打开的进程
try
{
foreach (Process thisproc in Process.GetProcessesByName("WINPROJ"))
{
if (!thisproc.CloseMainWindow())
{
thisproc.Kill();
}
}
}
catch (System.Exception ex )
{
ScriptManager.RegisterStartupScript(this.btnUpload, GetType(), "dis", "alert('进程杀死失败');", true);
}
}
浙公网安备 33010602011771号