mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-04 13:47:39 +03:00
Windows command scripts cleanup/ via @B00ze64
This commit is contained in:
parent
3dbdf54c1f
commit
db837204da
3 changed files with 39 additions and 33 deletions
|
@ -1,23 +1,21 @@
|
||||||
@ECHO OFF
|
@ECHO OFF & SETLOCAL ENABLEEXTENSIONS
|
||||||
|
|
||||||
SFC 2>&1 | FIND /i "/SCANNOW" >NUL
|
CD /d %~dp0
|
||||||
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
|
SFC 2>&1 | FIND /i "/SCANNOW" >NUL:
|
||||||
GOTO ADMINTASKS
|
IF ERRORLEVEL 1 GOTO :ELEVATE
|
||||||
|
GOTO :ADMINTASKS
|
||||||
|
|
||||||
:ELEVATE
|
:ELEVATE
|
||||||
|
|
||||||
ECHO Elevated privileges are temporarily required, just to register or remove the dnscrypt-proxy service
|
ECHO Elevated privileges are temporarily required, just to register or remove the dnscrypt-proxy service
|
||||||
CD /d %~dp0
|
|
||||||
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1); close();"
|
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1); close();"
|
||||||
EXIT
|
EXIT
|
||||||
|
|
||||||
:ADMINTASKS
|
:ADMINTASKS
|
||||||
|
|
||||||
CD /d %~dp0
|
dnscrypt-proxy.exe -service install
|
||||||
|
dnscrypt-proxy.exe -service start
|
||||||
|
|
||||||
CMD.EXE /c "dnscrypt-proxy.exe -service install"
|
ECHO.
|
||||||
CMD.EXE /c "dnscrypt-proxy.exe -service start"
|
|
||||||
|
|
||||||
ECHO ""
|
|
||||||
SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
|
SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
|
||||||
|
|
||||||
EXIT
|
EXIT
|
||||||
|
|
|
@ -1,23 +1,33 @@
|
||||||
@ECHO OFF
|
@ECHO OFF & SETLOCAL ENABLEEXTENSIONS
|
||||||
|
|
||||||
SFC 2>&1 | FIND /i "/SCANNOW" >NUL
|
CD /d %~dp0
|
||||||
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
|
SFC 2>&1 | FIND /i "/SCANNOW" >NUL:
|
||||||
GOTO ADMINTASKS
|
IF ERRORLEVEL 1 GOTO :ELEVATE
|
||||||
|
GOTO :ADMINTASKS
|
||||||
|
|
||||||
:ELEVATE
|
:ELEVATE
|
||||||
ECHO Elevated privileges are temporarily required, just to register or remove the dnscrypt-proxy service
|
|
||||||
CD /d %~dp0
|
ECHO Elevated privileges are temporarily required, just to register or remove the dnscrypt-proxy service.
|
||||||
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1); close();"
|
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1); close();"
|
||||||
EXIT
|
EXIT
|
||||||
|
|
||||||
:ADMINTASKS
|
:ADMINTASKS
|
||||||
|
|
||||||
CD /d %~dp0
|
REM If DNSCrypt-Proxy is not yet running restart will fail
|
||||||
|
Tasklist /FI "IMAGENAME eq dnscrypt-proxy.exe" /NH | Find "dnscrypt-proxy.exe" >NUL:
|
||||||
|
IF ERRORLEVEL 1 GOTO :SVCSTART
|
||||||
|
|
||||||
CMD.EXE /c "dnscrypt-proxy.exe -service stop"
|
ECHO Re-Starting Service...
|
||||||
CMD.EXE /c "dnscrypt-proxy.exe -service start"
|
dnscrypt-proxy.exe -service restart
|
||||||
|
GOTO :SAYTHANKS
|
||||||
|
|
||||||
ECHO ""
|
:SVCSTART
|
||||||
|
|
||||||
|
ECHO Starting Service...
|
||||||
|
dnscrypt-proxy.exe -service start
|
||||||
|
|
||||||
|
:SAYTHANKS
|
||||||
|
|
||||||
|
ECHO.
|
||||||
SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
|
SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
|
||||||
|
|
||||||
EXIT
|
EXIT
|
||||||
|
|
|
@ -1,23 +1,21 @@
|
||||||
@ECHO OFF
|
@ECHO OFF & SETLOCAL ENABLEEXTENSIONS
|
||||||
|
|
||||||
SFC 2>&1 | FIND /i "/SCANNOW" >NUL
|
CD /d %~dp0
|
||||||
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
|
SFC 2>&1 | FIND /i "/SCANNOW" >NUL:
|
||||||
GOTO ADMINTASKS
|
IF ERRORLEVEL 1 GOTO :ELEVATE
|
||||||
|
GOTO :ADMINTASKS
|
||||||
|
|
||||||
:ELEVATE
|
:ELEVATE
|
||||||
|
|
||||||
ECHO Elevated privileges are temporarily required, just to register or remove the dnscrypt-proxy service
|
ECHO Elevated privileges are temporarily required, just to register or remove the dnscrypt-proxy service
|
||||||
CD /d %~dp0
|
|
||||||
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1); close();"
|
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1); close();"
|
||||||
EXIT
|
EXIT
|
||||||
|
|
||||||
:ADMINTASKS
|
:ADMINTASKS
|
||||||
|
|
||||||
CD /d %~dp0
|
dnscrypt-proxy.exe -service stop
|
||||||
|
dnscrypt-proxy.exe -service uninstall
|
||||||
|
|
||||||
CMD.EXE /c ".\dnscrypt-proxy.exe -service stop"
|
ECHO.
|
||||||
CMD.EXE /c ".\dnscrypt-proxy.exe -service uninstall"
|
|
||||||
|
|
||||||
ECHO ""
|
|
||||||
SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
|
SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
|
||||||
|
|
||||||
EXIT
|
EXIT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue