np, glad i didnt cause offence, the idea was to show how to do things properly and handle all potential problems, theres lots more you could do with the code, but... thats for you to play with
the main 'issue' with the code u pasted was the openprocess stuff, where the handle wasn't closed, this causes resource leakage and is terribly bad programming practice
oh and no need for the credit either...