check for acrhive extraction
This commit is contained in:
parent
651342d06f
commit
528b707bab
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
|
||||||
@ -859,4 +861,16 @@ if %errorLevel% neq 0 (
|
|||||||
pause
|
pause
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
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
|
exit /b 0
|
||||||
Loading…
x
Reference in New Issue
Block a user