Sometimes you want to shutdown a running process before running an installation of a piece of software. In that case the native XP/win7/server08, utility TASKKILL comes in handy.

In a case where I had to upgrade MS Office Communicator to Lync! this would fail if OC was active on the users machine. So I just ran this command to close it before uninstalling.

cmd.exe /c TASKKILL /IM communicator.exe /T /F

No need to call any 3rd party tools like PSkill or any thing else..