循环10秒检测是否存在某进程

来源:互联网 发布:阿里巴巴北京总部 知乎 编辑:程序博客网 时间:2024/05/16 01:20
@echo off     set Program="firefox.exe"  :begintasklist -v | findstr %Program% > NUL  if ErrorLevel 1 (    echo "no exist"      exit  ) else (    echo "exist"    ping 127.0.0.1 -n 10 >nul ) goto begin
  • 原文地址