Created
February 11, 2022 08:46
-
-
Save lolmaus/b94a2eaa5b4d02602f2feb458b007bc2 to your computer and use it in GitHub Desktop.
C:\Users\lolmaus\AppData\Roaming\FAHClient\fah_restart.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
chcp 1251 >nul | |
set ln=Процесс fahcore найден! | |
set msg=FAHClient был перезапущен | |
chcp 866 >nul | |
:loop | |
cd %appdata%\FAHClient\ | |
tasklist /fi "imagename eq fahcore_21.exe" | find /i "fahcore_21.exe" > nul | |
if not errorlevel 1 set res=true | |
tasklist /fi "imagename eq fahcore_22.exe" | find /i "fahcore_22.exe" > nul | |
if not errorlevel 1 set res=true | |
if defined res ( Echo %date% %time:~0,2%:%time:~3,2% %ln% ) else ( | |
taskkill /f /im "FAHClient.exe" & start "" /min "%PROGRAMFILES(x86)%\FAHClient\FAHClient.exe" & echo %date% %time:~0,2%:%time:~3,2% %msg% | |
) | |
set res= | |
timeout 900 | |
Goto :loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment