本帖最后由 aloha20200628 于 2024-8-12 13:20 编辑
回复 1# 759503140
先从当前进程列表中查找 qq.exe 进程,成功后再用 wimc.exe 匹配其全路径...
- @echo off &for /f "tokens=2 delims=: " %%p in (
- 'tasklist /v /fi "imagename eq qq.exe" /fo list^|find /i "pid: " '
- ) do for /f "delims=" %%F in (
- 'wmic process where processid^=%%p get executablepath^|find ":\" '
- ) do (taskkill /im "qq.exe" /f >nul && "%%F")
- exit/b
复制代码
|