回复 14# luckboy45
用14楼要求的流程走一遍,只有获取*.dll全路径的可选方法不多,其中借用powershell一行流似乎至为简洁,但首启 ps 稍慢点,既然请ps进门了就顺手把 ‘去重’ 也给练了...
以下代码仅供参考
- @echo off &cd.>"0.0" &tasklist /m /fo csv|findstr /iv "映像名称 暂缺 tasklist.exe findstr.exe">0.1
- powershell "gc 0.1|%%{$_.split('.')[0].substring(1)}|select -unique|%%{gps $_|select -expandproperty modules|select filename|ac 0.0};gc 0.0|select -unique|sc 0.1"
- setlocal enabledelayedexpansion & (for /f "tokens=2 delims=}=" %%a in (0.1) do (
- set "a=%%a" &for /f "tokens=2 delims==" %%v in (
- 'wmic datafile where "name='!a:\=\\!'" get manufacturer /value^|find "=" '
- ) do set "v=%%v" &if /i "!v!"=="!v:microsoft corporation=!" echo,[%%a] !v:~,-1!))>list.txt
- del/q "0.?"&endlocal&pause&exit/b
复制代码
|