@echo off
net session >/dev/null 2>&1
if %errorLevel% neq 0 (
    powershell -Command "Start-Process %~f0 -Verb RunAs"
    exit /b
)
echo Aplicando configuracion Costa Networks...
powershell -ExecutionPolicy Bypass -Command "New-Item -Force -ItemType Directory %APPDATA%\RustDesk\config | Out-Null; Invoke-WebRequest https://rustdesk.costanetworks.es/RustDesk2.toml -OutFile %APPDATA%\RustDesk\config\RustDesk2.toml; Stop-Service RustDesk -Force -ErrorAction SilentlyContinue; Start-Sleep 2; Start-Service RustDesk -ErrorAction SilentlyContinue"
echo.
echo Listo. Abre RustDesk ahora.
pause
