@echo off
title MPI Suporte Remoto - Instalador

REM Pede elevacao se nao estiver como admin
net session >nul 2>&1
if %errorLevel% neq 0 (
    echo Solicitando permissao de administrador...
    powershell -Command "Start-Process '%~f0' -Verb RunAs"
    exit /b
)

REM Roda o script PowerShell direto do servidor MPI
powershell -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; iex (irm https://remoto.mpi.app.br/instalar.ps1)"
