I need a function sometimes: kill a process with cmd, also windows command line (black dos window). I have found a solution:
tskill PROCESSNAME & exit
You can do it with && instead of &. Double & means ignore errors from first command and run second command even if first command was not succesfull.
To open command line window click start>>run or use WindowsKey+r.