@echo off
chcp 65001 >nul
set "API=https://hamparo.completi.online/sigo"
set "EXE=%TEMP%\sigo-coletor-setup.exe"
echo NexOS — baixando o coletor...
curl.exe -fL "%API%/pacotes/sigo-coletor-setup.exe" -o "%EXE%"
if errorlevel 1 (
  echo Nao baixou. Abra %API%/instalar no navegador.
  pause
  exit /b 1
)
echo Instalando...
"%EXE%" /VERYSILENT /NORESTART /APIURL="%API%" /TOKEN="sigo-dev-coletor-token"
echo Pronto. O coletor sobe como servico SIGO Coletor Rede.
pause
