1
0
mirror of https://github.com/DNSCrypt/dnscrypt-proxy.git synced 2024-12-10 22:25:49 +01:00
dnscrypt-proxy/windows/service-install.bat
Frank Denis 8a0d919503 +x
2018-01-25 15:56:28 +01:00

22 lines
536 B
Batchfile
Executable File

@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