Commit adcb4d08 authored by Frank Denis's avatar Frank Denis

Revert "Windows command scripts cleanup/ via @B00ze64"

This reverts commit db837204.

@ingber: "2.0.9 works fine on my x64 Ubuntu VPS, but fails as did yours on Windows x64.
Your [@iWARR] solution on Windows works fine."

@iWARR: "I want to note, that *.bat file from v2.0.8 is able provide successfully
installation for the v2.0.9 pack, as usual. Other *.bat files from v2.0.8 are fine also."
parent ace955fd
@ECHO OFF & SETLOCAL ENABLEEXTENSIONS
@ECHO OFF
CD /d %~dp0
SFC 2>&1 | FIND /i "/SCANNOW" >NUL:
IF ERRORLEVEL 1 GOTO :ELEVATE
GOTO :ADMINTASKS
SFC 2>&1 | FIND /i "/SCANNOW" >NUL
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
GOTO ADMINTASKS
:ELEVATE
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();"
EXIT
:ADMINTASKS
dnscrypt-proxy.exe -service install
dnscrypt-proxy.exe -service start
CD /d %~dp0
CMD.EXE /c "dnscrypt-proxy.exe -service install"
CMD.EXE /c "dnscrypt-proxy.exe -service start"
ECHO.
ECHO ""
SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
EXIT
@ECHO OFF & SETLOCAL ENABLEEXTENSIONS
@ECHO OFF
CD /d %~dp0
SFC 2>&1 | FIND /i "/SCANNOW" >NUL:
IF ERRORLEVEL 1 GOTO :ELEVATE
GOTO :ADMINTASKS
SFC 2>&1 | FIND /i "/SCANNOW" >NUL
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
GOTO ADMINTASKS
: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();"
EXIT
:ADMINTASKS
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
ECHO Re-Starting Service...
dnscrypt-proxy.exe -service restart
GOTO :SAYTHANKS
:SVCSTART
ECHO Starting Service...
dnscrypt-proxy.exe -service start
CD /d %~dp0
:SAYTHANKS
CMD.EXE /c "dnscrypt-proxy.exe -service stop"
CMD.EXE /c "dnscrypt-proxy.exe -service start"
ECHO.
ECHO ""
SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
EXIT
@ECHO OFF & SETLOCAL ENABLEEXTENSIONS
@ECHO OFF
CD /d %~dp0
SFC 2>&1 | FIND /i "/SCANNOW" >NUL:
IF ERRORLEVEL 1 GOTO :ELEVATE
GOTO :ADMINTASKS
SFC 2>&1 | FIND /i "/SCANNOW" >NUL
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
GOTO ADMINTASKS
:ELEVATE
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();"
EXIT
:ADMINTASKS
dnscrypt-proxy.exe -service stop
dnscrypt-proxy.exe -service uninstall
CD /d %~dp0
CMD.EXE /c ".\dnscrypt-proxy.exe -service stop"
CMD.EXE /c ".\dnscrypt-proxy.exe -service uninstall"
ECHO.
ECHO ""
SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
EXIT
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment