Terminate a process in task manager  

Posted by: Quadtechindia in

public void terminate()
{
Process[] plist = Process.GetProcesses();
foreach (Process p in plist)
{
try
{
if (p.MainModule.ModuleName.ToUpper() == "WEBDEV.WEBSERVER.EXE")
{
//p.Kill();
}

if (p.MainModule.ModuleName.ToUpper() == "IEXPLORE.EXE")
{
p.Kill();
}
}
catch
{
}

}
}

This entry was posted on Monday, August 30, 2010 and is filed under . You can leave a response and follow any responses to this entry through the Subscribe to: Post Comments (Atom) .

0 comments

Post a Comment