本来想在执行netstat之前生成当前系统进程path变量表,例如 _pid8=C:\windows\system32\svchost.exe
但使用wmic process get processid,executablepath输出的表格中executablepath始终在pid前边,而路径比较复杂,没办法在for中取得完整路径与pid
for /f "skip=4 tokens=1,2" %%i in ('"wmic process get processid,executablepath"') do set _pid%%j=%%i
请问有没有办法自定义表格输出?
后来打算每行都执行以下代码,但显示速度就有点慢
wmicprocess where handle="%dtp%" get executablepath|find /v /i "executablepath"