Commit 5b6e7743 authored by Frank Denis's avatar Frank Denis

Add service installation scripts for Windows

parent 81715555
......@@ -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
......
@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
@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
@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
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