Files
mysql-tunnel/uninstall-service.bat
2026-09-21 16:46:55 +08:00

21 lines
405 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 exist "dist\mysql-tunnel.exe" (
dist\mysql-tunnel.exe --uninstall
) else (
echo dist\mysql-tunnel.exe not found; trying sc.exe
sc stop mysql-tunnel
sc delete mysql-tunnel
)
pause
endlocal