@echo off
chcp 65001 >nul
setlocal
set "ROOT=%~dp0"
set "LAUNCHER=%ROOT%ONE.DownloadBridgeLauncher.exe"
set "LAUNCHER_PROJECT=%ROOT%DownloadBridgeLauncher\ONE.DownloadBridgeLauncher.csproj"
if exist "%LAUNCHER%" (
  "%LAUNCHER%" unregister --root "%ROOT%."
  exit /b %errorlevel%
)
if exist "%LAUNCHER_PROJECT%" (
  dotnet run --project "%LAUNCHER_PROJECT%" -- unregister --root "%ROOT%."
  exit /b %errorlevel%
)
echo ONE.DownloadBridgeLauncher 없음: "%LAUNCHER%"
exit /b 1
