please explain. I have no idea what you are trying to do.
1) you have an app working on a remote computer ( a music player maybe ) and your code will run in remote machine and close the application.
2) you want to write an application that can be closed from a remote machine
3) you have to write a code that will close some app but code has to be controled from a remote location?