首页 > Windows开发 > 详细

在Windows批处理程序中使用WIMC 查找正在运行的进程

时间:2016-04-02 22:56:01      阅读:1107      评论:0      收藏:0      [点我收藏+]

@echo off

:SLEEP
TIMEOUT /T 60 /NOBREAK

:CHECK
echo %TIME% | findstr 23:5 >nul
if not errorlevel = 1 goto END

WMIC PROCESS WHERE NAME="java.exe" get commandline | findstr /i helloworld >nul
if not errorlevel goto RUNNING

:RUN
cd /D W:\external\input\input-trigger
if exist *-* (
    echo %date% - %time% - trigger file exist, start up the run.bat >>d:\temp\log.txt
    call d:\apps\run.bat
    goto SLEEP
) else (
    echo %date% - %time% - trigger file does not exist >>d:\temp\log.txt
    goto SLEEP
)

:RUNNING
echo %date% - %time% - helloworld is running >>d:\temp\log.txt
goto SLEEP

:END

在Windows批处理程序中使用WIMC 查找正在运行的进程

原文:http://www.cnblogs.com/wencle/p/5348494.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!