批处理如何获得某个进程的路径

2024-12-21 02:12:41
推荐回答(1个)
回答1:

@echo off
for /f "delims=" %%i in ('wmic Process Where "Name='svchost.exe'" Get ExecutablePath/Value') do (
set "%%i">nul
)
echo %ExecutablePath%
pause