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%
原文地址:https://www.cnblogs.com/FengGeBlog/p/11855054.html