mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2024-11-10 01:44:48 +03:00
Add service installation scripts for Windows
This commit is contained in:
parent
81715555be
commit
5b6e774356
@ -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
|
||||
|
21
windows/service-install.bat
Normal file
21
windows/service-install.bat
Normal 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
|
20
windows/service-restart.bat
Normal file
20
windows/service-restart.bat
Normal 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
|
21
windows/service-uninstall.bat
Normal file
21
windows/service-uninstall.bat
Normal 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
|
Loading…
Reference in New Issue
Block a user