how to run an executable file and then later kill or terminate the same process with R in Windows

前端 未结 3 809
感情败类
感情败类 2020-12-10 07:02

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

3条回答
  •  感动是毒
    2020-12-10 07:33

    You could use system function:

    system("Taskkill /IM myfile.exe /F")
    

    edit: This worked in my computer with Windows 7 (tested with killing skype.exe).

提交回复
热议问题