thiago costa

thiago costa

  • NA
  • 319
  • 0

How to kill process if processname contains sting.

Aug 29 2013 9:24 PM
This is my current code.

foreach (Process proc in Process.GetProcessesByName("ollydbg")){proc.Kill();}


How is it possible for me to kill all process that CONTAIN "olly" ...

So for example, contains "note" would kill notepad, notebook, notepad++, etc etc
Example 2, contains "olly" would kill, ollydbg, ollyplugin, etc etc.

In another words, I want to kill all processes IF what ever I specify, contains in process.name

Thanks guys.

Answers (6)