set 例外=cmd.exe,conhost.exe,explorer.exe,csrss.exe,lsass.exe,lsm.exe,services.exe,svchost.exe,winlogon.exe,wininit.exe,smss.exe,audiodg.exe
if "%~nx1"=="" ( set p=%~dp1) else (set p=%~dpnx1\)
set p=!p:\=\\!
for /f "skip=2 delims=, tokens=2,3" %%r in ('wmic process where "ExecutablePath like '!p!%%'" get executablepath^,processid^,status /format:csv ') do (
set /a lw=0 && for %%x in (!例外!) do (if /i "%%x"=="%%~nxr" set /a lw=1 )