End a taks by its exe name

Tech-Archive recommends: Fix windows errors by optimizing your registry



hi,

how can i end a task by its exe name, for example if i send
"notepad.exe" as parameter it will close notepad.


thanks,
AB

.