Skip to content

Commit a0e76fa

Browse files
committed
Small refactoring
1 parent dfbe9f3 commit a0e76fa

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

teleme7ry.bat

+18-16
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,31 @@ ping 127.0.0.1 -n 2 > nul
1212
net session >nul 2>&1
1313
setlocal
1414
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
15-
if "%version%" == "6.1" (goto admin) else (goto incompatible)
15+
if "%version%" == "6.1" (
16+
goto admin
17+
) else (
18+
cls
19+
color 4f
20+
echo.
21+
echo ERROR: %name% is not compatible with this operating system.
22+
timeout /t -1
23+
exit
24+
)
1625
endlocal
17-
:incompatible
18-
cls
19-
color 4f
20-
echo.
21-
echo ERROR: %name% is not compatible with this operating system.
22-
timeout /t -1
23-
exit
2426
:admin
2527
echo.
2628
echo Checking permissions...
2729
ping 127.0.0.1 -n 2 > nul
28-
fltmc >nul 2>&1 || (goto error)
30+
fltmc >nul 2>&1 || (
31+
cls
32+
color 4f
33+
echo.
34+
echo ERROR: %name% needs elevated privileges in order to make changes to your system.
35+
timeout /t -1
36+
exit
37+
)
2938
goto home
3039
goto admin
31-
:error
32-
cls
33-
color 4f
34-
echo.
35-
echo ERROR: %name% needs elevated privileges in order to make changes to your system.
36-
timeout /t -1
37-
exit
3840
:home
3941
cls
4042
color 3f

0 commit comments

Comments
 (0)