@echo off
:: ============================================================
:: SOPORTE REMOTO PyP - lanzador (PyP Technologies)
:: Doble click = instalar. Tambien acepta parametros:
::   SOPORTE.bat -Reinstalar
::   SOPORTE.bat -Desinstalar
:: Se auto-eleva a Administrador.
:: ============================================================

net session >nul 2>&1
if %errorlevel% neq 0 (
    echo Solicitando permisos de Administrador...
    powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -ArgumentList '%*' -Verb RunAs"
    exit /b
)

cd /d "%~dp0"

if not exist "%~dp0instalar-soporte-remoto.ps1" (
    echo ERROR: no se encuentra instalar-soporte-remoto.ps1 en esta carpeta.
    pause
    exit /b 1
)

powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0instalar-soporte-remoto.ps1" %*

pause
