Add service installation scripts for Windows

This commit is contained in:
Frank Denis 2018-01-25 14:15:28 +01:00
parent 81715555be
commit 5b6e774356
4 changed files with 64 additions and 0 deletions

View File

@ -20,6 +20,7 @@ script:
- mkdir win32
- ln dnscrypt-proxy.exe win32/
- ln ../LICENSE dnscrypt-proxy.toml forwarding-rules.txt blacklist.txt win32/
- ln ../windows/* win32/
- zip -9 -r dnscrypt-proxy-win32-${TRAVIS_TAG:-dev}.zip win32
- go clean
@ -27,6 +28,7 @@ script:
- mkdir win64
- ln dnscrypt-proxy.exe win64/
- ln ../LICENSE dnscrypt-proxy.toml forwarding-rules.txt blacklist.txt win64/
- ln ../windows/* win64/
- zip -9 -r dnscrypt-proxy-win64-${TRAVIS_TAG:-dev}.zip win64
- go clean

View File

@ -0,0 +1,21 @@
@NET session
@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
@CD /d %~dp0
.\dnscrypt-proxy.exe -service install
.\dnscrypt-proxy.exe -service start
@ECHO ""
@SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
EXIT

View File

@ -0,0 +1,20 @@
@NET session
@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
@CD /d %~dp0
.\dnscrypt-proxy.exe -service restart
@ECHO ""
@SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
EXIT

View File

@ -0,0 +1,21 @@
@NET session
@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
@CD /d %~dp0
.\dnscrypt-proxy.exe -service stop
.\dnscrypt-proxy.exe -service uninstall
@ECHO ""
@SET /P _=Thank you for using dnscrypt-proxy! Hit [RETURN] to finish
EXIT