downgrade admin rights check

вернул все обратно из за https://github.com/Flowseal/zapret-discord-youtube/pull/1358
This commit is contained in:
fridorin 2025-03-01 12:54:12 +03:00
parent cacdebc5d5
commit 2b16cb4444
2 changed files with 6 additions and 6 deletions

View File

@ -4,13 +4,13 @@ chcp 65001 > nul
:: 65001 - UTF-8
:: Admin rights check
net session >nul 2>&1
if %errorLevel% neq 0 (
if "%1"=="admin" (
echo Started with admin rights
) else (
echo Requesting admin rights...
powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/k \"\"%~f0\" admin\"' -Verb RunAs"
exit /b
)
if "%1"=="admin" echo Started with admin rights
:: Main
cd /d "%~dp0"

View File

@ -2,13 +2,13 @@
chcp 65001 > nul
:: 65001 - UTF-8
net session >nul 2>&1
if %errorLevel% neq 0 (
if "%1"=="admin" (
echo Started with admin rights
) else (
echo Requesting admin rights...
powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/k \"\"%~f0\" admin\"' -Verb RunAs"
exit /b
)
if "%1"=="admin" echo Started with admin rights
set SRVCNAME=zapret