Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Batch file to kill and restart not responding program

I am running a program (Win7) which sometimes gets stuck and not responding.

Just wanted your help to write batch process that can check the program status and if it's Not responding then close and open it again

like image 636
user3241320 Avatar asked Jan 27 '14 16:01

user3241320


1 Answers

Test this: it should only relaunch be2beat when the task is not responding, and has been killed forcefully.

@echo off 
taskkill /im "Be2Beat.exe" /fi "STATUS eq NOT RESPONDING" /f >nul && start "" "C:\Program Files (x86)\Be2Beat\Be2Beat Multimedia Platform\Be2Beat.exe"
like image 101
foxidrive Avatar answered Sep 28 '22 16:09

foxidrive