本帖最后由 hanyeguxing 于 2011-4-11 21:01 编辑
定义固定进程名例如"ctfmon.exe"为变量
设定检查目录为c:\windows\system32\
获得多出的进程conime.exe- @echo off
- set ""ctfmon.exe"=="
- for /f "skip=1 delims=" %%a in ('wmic process where "name like '______.exe'" get executablepath') do if exist "c:\windows\system32\%%~na.exe" if not defined "%%~na.exe" set "a=%%~na.exe"
- if defined a (echo 存在多出的%a%) else echo 不存在多出
- pause
复制代码
|