I took another look at your code and you're calling Sys.Exists with a parameter... this is improper.
You should do something like this:
If ( Sys["WaitProcess"]("ProcessIwantToKill,2000")["Exists"])
Exists is a method/property of the process object but will not always work correctly unless you first check to see if it exists. So, WaitProcess is called to give the process an amount of time to be recognized before the script code evaluates.
Let me know if this works.
Automated Testing Evangelists
Definition expert - noun - Unknown drip under pressure