mirror of
https://github.com/Flowseal/zapret-discord-youtube.git
synced 2025-04-10 15:25:39 -07:00
Enhancements
A more elegant stop
This commit is contained in:
parent
f7a2220afd
commit
f70fe5cb27
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user