Board logo

标题: [其他] 求批处理-win10系统,怎么结束未响应进程 [打印本页]

作者: 812508    时间: 2024-4-5 12:07     标题: 求批处理-win10系统,怎么结束未响应进程

:1
ping 127.0.0.1 -n "3">nul
tasklist /nh|find /i "MapleStory2.exe"
   if ERRORLEVEL 1 (call :2) else (
           call :3
   )
:2
cls
shutdown /r /f
:3
taskkill.exe /f /fi "STATUS eq NOT RESPONDING" /im Client.exe
exit

我这样弄 运行后直接就关机了
作者: Five66    时间: 2024-4-5 12:40

:1
ping 127.0.0.1 -n "3">nul
tasklist /nh|find /i "MapleStory2.exe"
   if ERRORLEVEL 1 (call :2) else (
           call :3
   )
:2
cls
rem shutdown /r /f
pause&exit/b
:3
taskkill.exe /f /fi "STATUS eq NOT RESPONDING" /im Client.exe
exit
作者: ShowCode    时间: 2024-4-5 14:54

回复 1# 812508


V1.bat
  1. @echo off
  2. tasklist /nh | find /i "MapleStory2.exe" && taskkill.exe /f /fi "STATUS eq NOT RESPONDING" /im Client.exe
复制代码

作者: ShowCode    时间: 2024-4-5 14:55

回复 1# 812508


V2.bat
  1. @echo off
  2. tasklist /nh | find /i "MapleStory2.exe"
  3. if not errorlevel 1 (
  4.     taskkill.exe /f /fi "STATUS eq NOT RESPONDING" /im Client.exe
  5. )
复制代码





欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2