I would n't remember it completely now. There are two ways that I had tried. May not be the best, but worked.
(1) There is an exe called "Kill.exe" available from Micorosoft. Just pass the Process ID (available in the Task Manager) or the Window Text (Form.Caption) , and that process will be killed.
e.g. To kill a VB application that running and had a Form.Caption "Hello App", use the shell command to execute Kill "Hello App" and the process is killed.
You could also use FindWindow() API and then get the Process ID of the application and then call the Kill.exe.
(2) Second way, is use the Windows Mangement Instrumentation(WMI - WBEM) and you can query the objects to retrieve all the Processes running in the local machine and then kill the chosen one.
Hope it helps
Cheers
Manish
(2)