Revert "Windows command scripts cleanup/ via @B00ze64"

This reverts commit db837204da.

@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."
This commit is contained in:
Frank Denis 2018-04-16 02:30:23 +02:00
parent ace955fd9f
commit adcb4d086f
3 changed files with 33 additions and 39 deletions

View File

@ -1,21 +1,23 @@
@ECHO OFF & SETLOCAL ENABLEEXTENSIONS @ECHO OFF
CD /d %~dp0 SFC 2>&1 | FIND /i "/SCANNOW" >NUL
SFC 2>&1 | FIND /i "/SCANNOW" >NUL: IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
IF ERRORLEVEL 1 GOTO :ELEVATE GOTO ADMINTASKS
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
dnscrypt-proxy.exe -service install CD /d %~dp0
dnscrypt-proxy.exe -service start
ECHO. CMD.EXE /c "dnscrypt-proxy.exe -service install"
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

View File

@ -1,33 +1,23 @@
@ECHO OFF & SETLOCAL ENABLEEXTENSIONS @ECHO OFF
CD /d %~dp0 SFC 2>&1 | FIND /i "/SCANNOW" >NUL
SFC 2>&1 | FIND /i "/SCANNOW" >NUL: IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
IF ERRORLEVEL 1 GOTO :ELEVATE GOTO ADMINTASKS
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
REM If DNSCrypt-Proxy is not yet running restart will fail CD /d %~dp0
Tasklist /FI "IMAGENAME eq dnscrypt-proxy.exe" /NH | Find "dnscrypt-proxy.exe" >NUL:
IF ERRORLEVEL 1 GOTO :SVCSTART
ECHO Re-Starting Service... CMD.EXE /c "dnscrypt-proxy.exe -service stop"
dnscrypt-proxy.exe -service restart CMD.EXE /c "dnscrypt-proxy.exe -service start"
GOTO :SAYTHANKS
:SVCSTART ECHO ""
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

View File

@ -1,21 +1,23 @@
@ECHO OFF & SETLOCAL ENABLEEXTENSIONS @ECHO OFF
CD /d %~dp0 SFC 2>&1 | FIND /i "/SCANNOW" >NUL
SFC 2>&1 | FIND /i "/SCANNOW" >NUL: IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
IF ERRORLEVEL 1 GOTO :ELEVATE GOTO ADMINTASKS
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
dnscrypt-proxy.exe -service stop CD /d %~dp0
dnscrypt-proxy.exe -service uninstall
ECHO. CMD.EXE /c ".\dnscrypt-proxy.exe -service stop"
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