@@echo off
title ORBS RustDesk Remove
echo ORBS RustDesk Remove
echo.
echo WARNING:
echo Only run this while onsite or while connected with another remote service.
echo If you are connected through RustDesk, this can disconnect you.
echo.
pause

set "PS1=%TEMP%\ORBS-RustDesk-Remove.ps1"

powershell -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; Invoke-WebRequest 'https://orbscomputers.com/downloads/rustremove/ORBS-RustDesk-Remove.ps1' -OutFile '%PS1%' -UseBasicParsing"

if not exist "%PS1%" (
  echo Could not download ORBS RustDesk removal script.
  pause
  exit /b 1
)

powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-Process powershell -Verb RunAs -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%PS1%""'"