@echo off&setlocal ENABLEDELAYEDEXPANSION
For /f %%i in ('wmic process where "ExecutablePath like 'k:\\%%'"') do (
set a=%%i
if "!a!" neq "" echo 存在
)
pause
for /f "skip=1 delims=" %%a in ('wmic process where "ExecutablePath like 'k:\\%%'" get name') do set k=1
if defined k echo 存在
zm900612 发表于 2011-7-10 23:04