27 lines
493 B
Batchfile
27 lines
493 B
Batchfile
@echo off
|
|
setlocal
|
|
cd /d "%~dp0"
|
|
|
|
net session >nul 2>&1
|
|
if %errorLevel% neq 0 (
|
|
echo Requesting Administrator...
|
|
powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
|
|
exit /b
|
|
)
|
|
|
|
if not exist "dist\mysql-tunnel.exe" (
|
|
echo dist\mysql-tunnel.exe not found. Run build.bat first.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
if not exist "config.yaml" (
|
|
echo config.yaml not found in %cd%
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
dist\mysql-tunnel.exe --install --config "%cd%\config.yaml"
|
|
pause
|
|
endlocal
|