@echo off
rem YAS Bot: instala o app neste computador. Baixa o instalador de https://yasbot.com.br/yas-app.ps1 e roda. Nao precisa ser administrador.
title Instalando o YAS Bot
set "YAS_INST=%TEMP%\yas-app-instalar.ps1"
if exist "%YAS_INST%" del "%YAS_INST%"
echo Baixando o instalador do YAS Bot...
powershell -NoProfile -Command "try { $t = Invoke-RestMethod -UseBasicParsing 'https://yasbot.com.br/yas-app.ps1'; Set-Content -Encoding UTF8 -Path $env:YAS_INST -Value $t } catch { exit 1 }"
if not exist "%YAS_INST%" (
  echo.
  echo Nao consegui baixar o instalador. Confira a internet e tente de novo.
  pause
  exit /b 1
)
powershell -NoProfile -ExecutionPolicy Bypass -File "%YAS_INST%"
del "%YAS_INST%" >nul 2>&1
echo.
pause