let\'s say i have an executable file stored in c:\\my directory\\my file.exe that i would like to initiate near the beginning of my R script, and then terminate
c:\\my directory\\my file.exe
You could use system function:
system
system("Taskkill /IM myfile.exe /F")
edit: This worked in my computer with Windows 7 (tested with killing skype.exe).