联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
Wmic Process Where "Name='explorer.exe' And ExecutablePath<>'C:\\Windows\\explorer.exe'" call Terminate
Wmic Process Where "Name='explorer.exe' And ExecutablePath<>'C:\\Windows\\explorer.exe'" Get ExecutablePath
@echo off setlocal enabledelayedexpansion set count= for /f "tokens=1 delims=:" %%a in ('tasklist ^| findstr /n /i "explorer.exe"') do ( set /a count=!count!+1 ) echo 有%count%个explorer.exe进程
Originally posted by HAT at 2008-5-17 03:22 PM: [CODE]@echo off setlocal enabledelayedexpansion set count= for /f "tokens=1 delims=:" %%a in ('tasklist ^| findstr /n /i "explorer.exe"') do ( set /a count=!count!+1 ) e ...
Originally posted by slore at 2008-5-17 03:27 PM: 不需要启动变量延迟
@echo off for /f "skip=1 delims=*" %%i in ('Wmic Process Where "Name='explorer.exe' And ExecutablePath<>'C:\\Windows\\explorer.exe'" Get ExecutablePath') do ( echo 除C:\Windows\explorer.exe以外的进程路径%%i set /a count+=1 ) echo 除C:\Windows\explorer.exe以外的总进程数%count% pause