Merge pull request #1978 from EgorWeders/patch-1

Добавляет вывод о проверке статуса сервисов
This commit is contained in:
Flowseal 2025-04-03 14:00:02 +03:00 committed by GitHub
commit cd2d802cd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,14 +2,21 @@
chcp 65001 > nul chcp 65001 > nul
:: 65001 - UTF-8 :: 65001 - UTF-8
if "%~1"=="" ( if "%~1"=="" (
echo "Checking of already running service instances (see services.msc for more info)"
echo "Services status check..."
call :test_service zapret call :test_service zapret
call :test_service WinDivert call :test_service WinDivert
echo "Services status check complete!"
pause pause
) else ( ) else (
call :test_service "%~1" "soft" call :test_service "%~1" "soft"
) )
exit /b exit /b
:test_service :test_service
@ -22,7 +29,7 @@ set "ServiceStatus=%ServiceStatus: =%"
if "%ServiceStatus%"=="RUNNING" ( if "%ServiceStatus%"=="RUNNING" (
if "%~2"=="soft" ( if "%~2"=="soft" (
echo "%ServiceName%" is ALREADY RUNNING as service! Use "serivce_remove.bat" first if you want to run standalone bat. echo "%ServiceName%" is ALREADY RUNNING as service! Use "service_remove.bat" first if you want to run standalone bat.
pause pause
) else ( ) else (
echo "%ServiceName%" service is RUNNING. echo "%ServiceName%" service is RUNNING.