mirror of
https://github.com/Flowseal/zapret-discord-youtube.git
synced 2026-03-17 22:01:53 +00:00
check for acrhive extraction
This commit is contained in:
14
service.bat
14
service.bat
@@ -33,7 +33,9 @@ if "%1"=="admin" (
|
|||||||
|
|
||||||
echo Started with admin rights
|
echo Started with admin rights
|
||||||
) else (
|
) else (
|
||||||
|
call :check_extracted
|
||||||
call :check_command powershell
|
call :check_command powershell
|
||||||
|
|
||||||
echo Requesting admin rights...
|
echo Requesting admin rights...
|
||||||
powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/c \"\"%~f0\" admin\"' -Verb RunAs"
|
powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/c \"\"%~f0\" admin\"' -Verb RunAs"
|
||||||
exit
|
exit
|
||||||
@@ -860,3 +862,15 @@ if %errorLevel% neq 0 (
|
|||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
exit /b 0
|
exit /b 0
|
||||||
|
|
||||||
|
:check_extracted
|
||||||
|
set "extracted=1"
|
||||||
|
|
||||||
|
if not exist "%~dp0bin\" set "extracted=0"
|
||||||
|
|
||||||
|
if "%extracted%"=="0" (
|
||||||
|
call :PrintRed "Zapret must be extracted from archive first"
|
||||||
|
pause
|
||||||
|
exit
|
||||||
|
)
|
||||||
|
exit /b 0
|
||||||
Reference in New Issue
Block a user