127.一个很好的通过Bat命令查找进程,并kill这个进程的命令
批量安装的时候,需要将可能执行的ugraf进程删除,这个bat不错,分享下!!:CHECK_RUNNING
rem __________ End check for running ugraf, try 3 times. ___________________________________
set UGRAF_RUNNING=false
tasklist /nh | findstr /i "ugraf.exe" 1>nul 2>&1 && set UGRAF_RUNNING=true
if %UGRAF_RUNNING% == true (
echo . >>%LOG%
echo ----NX is running, trying to kill it---- >>%LOG%
taskkill /IM "ugraf.exe" /F
echo wait for 5 sec >>%LOG%
ping 127.0.0.1 -n 5 >null
set UGRAF_RUNNING=false
)
页:
[1]