用tasklist+wmic获取进程全路径的命令行方式如下:- for /f "tokens=1-2" %a in ('tasklist 2^>nul^|findstr /i "\<.*.exe" 2^>nul') do @for /f "tokens=*" %c in ('wmic process where processid^=%~b get executablepath 2^>nul^|findstr -i "%~a"') do @if not defined _[%c] @echo;%c&set "_[%c]=true"
复制代码 用tasklist+wmic获取进程全路径的批处理方式如下:- for /f "tokens=1-2" %%a in ('tasklist 2^>nul^|findstr /i "\<.*.exe" 2^>nul') do @for /f "tokens=*" %%c in ('wmic process where processid^=%%~b get executablepath 2^>nul^|findstr -i "%%~a"') do @if not defined _[%%c] @echo;%%c&set "_[%%c]=true"
复制代码
|