Thread: kill process
View Single Post
  #4 (permalink)  
Old 06-23-2008, 05:04 PM
gaylo565's Avatar   
gaylo565 gaylo565 is offline
Programmer
 
Join Date: May 2007
Location: flagstaff, az
Posts: 187
Last Blog:
String Manipulation wi...
Rep Power: 9
gaylo565 is a jewel in the roughgaylo565 is a jewel in the roughgaylo565 is a jewel in the rough
Default Re: kill process

I would use your old code but just use an or in your if statement.
Code:
foreach (Process p in Process.GetProcesses())
{
if (p.ProcessName.ToLower() == "star" || p.ProcessName.ToLower() == "firefox")

p.Kill();
}
that should fix your problem
Reply With Quote