windows系统获取进程的pid号并终止

for /f "tokens=1,2,3,* delims= " %a in ('tasklist ^| findstr "AutodeskDesktopApp.exe"') do (set commitd2=%b) && echo %commitd2%
taskkill /f /pid %commitd2%

 

posted @ 2019-11-14 10:01  峰哥ge  阅读(1000)  评论(0编辑  收藏  举报