From 2b16cb4444f18385ab0c9bf0b56f682489570581 Mon Sep 17 00:00:00 2001 From: fridorin Date: Sat, 1 Mar 2025 12:54:12 +0300 Subject: [PATCH] downgrade admin rights check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit вернул все обратно из за https://github.com/Flowseal/zapret-discord-youtube/pull/1358 --- service_install.bat | 6 +++--- service_remove.bat | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/service_install.bat b/service_install.bat index e97cd01..122284d 100644 --- a/service_install.bat +++ b/service_install.bat @@ -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" diff --git a/service_remove.bat b/service_remove.bat index e9c092e..5256a93 100644 --- a/service_remove.bat +++ b/service_remove.bat @@ -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