mirror of
https://github.com/Flowseal/zapret-discord-youtube.git
synced 2025-04-18 00:21:29 -07:00
Enhancements
A more elegant stop
This commit is contained in:
parent
f7a2220afd
commit
f70fe5cb27
@ -1,14 +1,14 @@
|
|||||||
@echo off
|
@echo off
|
||||||
chcp 65001 >nul
|
chcp 65001 > nul
|
||||||
:: 65001 - UTF-8
|
:: 65001 - UTF-8
|
||||||
|
|
||||||
set "arg=%1"
|
net session >nul 2>&1
|
||||||
if "%arg%" == "admin" (
|
if %errorLevel% neq 0 (
|
||||||
echo Restarted with admin rights
|
echo Requesting admin rights...
|
||||||
) else (
|
|
||||||
powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/k \"\"%~f0\" admin\"' -Verb RunAs"
|
powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/k \"\"%~f0\" admin\"' -Verb RunAs"
|
||||||
exit /b
|
exit /b
|
||||||
)
|
)
|
||||||
|
if "%1"=="admin" echo Started with admin rights
|
||||||
|
|
||||||
set SRVCNAME=zapret
|
set SRVCNAME=zapret
|
||||||
|
|
||||||
@ -19,3 +19,8 @@ net stop "WinDivert"
|
|||||||
sc delete "WinDivert"
|
sc delete "WinDivert"
|
||||||
net stop "WinDivert14"
|
net stop "WinDivert14"
|
||||||
sc delete "WinDivert14"
|
sc delete "WinDivert14"
|
||||||
|
|
||||||
|
echo Services have been stopped
|
||||||
|
|
||||||
|
pause
|
||||||
|
endlocal
|
||||||
|
Loading…
Reference in New Issue
Block a user