Enhancements

A more elegant stop
This commit is contained in:
fridorin 2025-02-24 20:14:42 +03:00
parent f7a2220afd
commit f70fe5cb27

View File

@ -1,14 +1,14 @@
@echo off
chcp 65001 >nul
chcp 65001 > nul
:: 65001 - UTF-8
set "arg=%1"
if "%arg%" == "admin" (
echo Restarted with admin rights
) else (
net session >nul 2>&1
if %errorLevel% neq 0 (
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
@ -19,3 +19,8 @@ net stop "WinDivert"
sc delete "WinDivert"
net stop "WinDivert14"
sc delete "WinDivert14"
echo Services have been stopped
pause
endlocal