- @echo off
-
- WMIC PROCESS CALL CREATE "EXPLORER http://www.baidu.com" | findstr "ProcessId" >> PID.TXT
- ping 127.1 -n 3
-
- WMIC PROCESS CALL CREATE "EXPLORER http://www.163.com" | findstr "ProcessId" >> PID.TXT
- ping 127.1 -n 3
-
- WMIC PROCESS CALL CREATE "EXPLORER http://www.sina.com.cn" | findstr "ProcessId" >> PID.TXT
- ping 127.1 -n 3
- for /f "tokens=1,2,3 delims= " %%i in (PID.TXT) do echo %%k >>PID2.TXT
- for /f "tokens=1,2 delims=;" %%i in (PID2.TXT) do echo %%i >>PID3.TXT
- ping 127.1 -n 5
- for /f %%i in (PID3.TXT) do WMIC PROCESS where processid=%%i call terminate
- del PID.TXT PID2.TXT PID3.TXT
- pause
复制代码 按理说应该可以啊,可是创建的processid 和 任务管理器中看到的不同
我已经把explorer换成了IEXPLORE.EXE 来打开网页,问题解决了 |