@echo off
title CompArt Systems - Assistencia Remota (Equipa)
chcp 65001 >nul 2>&1

echo ============================================
echo   CompArt Systems - Assistencia Remota
echo   Versao Equipa (portatil - sem servico)
echo ============================================
echo.

set "SERVER=116.203.52.248"
set "KEY=VoNciHfK04+8tqVDJH8gLs5CbsXpECQ4jBTuFPEt1XU="

set "CFG=%APPDATA%\RustDesk\config"
if not exist "%CFG%" mkdir "%CFG%"

(
echo rendezvous_server = '%SERVER%:21116'
echo nat_type = 1
echo serial = 0
echo unlock_pin = ''
echo trusted_devices = ''
echo.
echo [options]
echo custom-rendezvous-server = '%SERVER%:21116'
echo relay-server = '%SERVER%:21117'
echo key = '%KEY%'
) > "%CFG%\RustDesk2.toml"
(
echo key_confirmed = true
) > "%CFG%\RustDesk.toml"

echo [OK] Configuracao escrita.
echo [OK] A abrir RustDesk...
echo.
echo NOTA: versao portatil - sem servico, sem registo automatico.
echo Use e feche quando terminar a assistencia.
echo.

start "" "%~dp0CompArt_Equipa.exe"

timeout /t 5 /nobreak >nul
exit
