Skip to content

Commit adcb4d0

Browse files
committed
Revert "Windows command scripts cleanup/ via @B00ze64"
This reverts commit db83720. @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."
1 parent ace955f commit adcb4d0

3 files changed

Lines changed: 33 additions & 39 deletions

File tree

windows/service-install.bat

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
@ECHO OFF & SETLOCAL ENABLEEXTENSIONS
1+
@ECHO OFF
22

3-
CD /d %~dp0
4-
SFC 2>&1 | FIND /i "/SCANNOW" >NUL:
5-
IF ERRORLEVEL 1 GOTO :ELEVATE
6-
GOTO :ADMINTASKS
3+
SFC 2>&1 | FIND /i "/SCANNOW" >NUL
4+
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
5+
GOTO ADMINTASKS
76

87
:ELEVATE
9-
108
ECHO Elevated privileges are temporarily required, just to register or remove the dnscrypt-proxy service
9+
CD /d %~dp0
1110
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1); close();"
1211
EXIT
1312

1413
:ADMINTASKS
1514

16-
dnscrypt-proxy.exe -service install
17-
dnscrypt-proxy.exe -service start
15+
CD /d %~dp0
16+
17+
CMD.EXE /c "dnscrypt-proxy.exe -service install"
18+
CMD.EXE /c "dnscrypt-proxy.exe -service start"
1819

19-
ECHO.
20+
ECHO ""
2021
SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
22+
2123
EXIT

windows/service-restart.bat

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,23 @@
1-
@ECHO OFF & SETLOCAL ENABLEEXTENSIONS
1+
@ECHO OFF
22

3-
CD /d %~dp0
4-
SFC 2>&1 | FIND /i "/SCANNOW" >NUL:
5-
IF ERRORLEVEL 1 GOTO :ELEVATE
6-
GOTO :ADMINTASKS
3+
SFC 2>&1 | FIND /i "/SCANNOW" >NUL
4+
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
5+
GOTO ADMINTASKS
76

87
:ELEVATE
9-
10-
ECHO Elevated privileges are temporarily required, just to register or remove the dnscrypt-proxy service.
8+
ECHO Elevated privileges are temporarily required, just to register or remove the dnscrypt-proxy service
9+
CD /d %~dp0
1110
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1); close();"
1211
EXIT
1312

1413
:ADMINTASKS
1514

16-
REM If DNSCrypt-Proxy is not yet running restart will fail
17-
Tasklist /FI "IMAGENAME eq dnscrypt-proxy.exe" /NH | Find "dnscrypt-proxy.exe" >NUL:
18-
IF ERRORLEVEL 1 GOTO :SVCSTART
19-
20-
ECHO Re-Starting Service...
21-
dnscrypt-proxy.exe -service restart
22-
GOTO :SAYTHANKS
23-
24-
:SVCSTART
25-
26-
ECHO Starting Service...
27-
dnscrypt-proxy.exe -service start
15+
CD /d %~dp0
2816

29-
:SAYTHANKS
17+
CMD.EXE /c "dnscrypt-proxy.exe -service stop"
18+
CMD.EXE /c "dnscrypt-proxy.exe -service start"
3019

31-
ECHO.
20+
ECHO ""
3221
SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
22+
3323
EXIT

windows/service-uninstall.bat

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
@ECHO OFF & SETLOCAL ENABLEEXTENSIONS
1+
@ECHO OFF
22

3-
CD /d %~dp0
4-
SFC 2>&1 | FIND /i "/SCANNOW" >NUL:
5-
IF ERRORLEVEL 1 GOTO :ELEVATE
6-
GOTO :ADMINTASKS
3+
SFC 2>&1 | FIND /i "/SCANNOW" >NUL
4+
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
5+
GOTO ADMINTASKS
76

87
:ELEVATE
9-
108
ECHO Elevated privileges are temporarily required, just to register or remove the dnscrypt-proxy service
9+
CD /d %~dp0
1110
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1); close();"
1211
EXIT
1312

1413
:ADMINTASKS
1514

16-
dnscrypt-proxy.exe -service stop
17-
dnscrypt-proxy.exe -service uninstall
15+
CD /d %~dp0
16+
17+
CMD.EXE /c ".\dnscrypt-proxy.exe -service stop"
18+
CMD.EXE /c ".\dnscrypt-proxy.exe -service uninstall"
1819

19-
ECHO.
20+
ECHO ""
2021
SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
22+
2123
EXIT

0 commit comments

Comments
 (0)