@echo off
setlocal
set "SCRIPT_URL=https://support.cosmolan.fr/rustdesk/downloads/install-rustdesk-cosmolan.ps1"
set "SCRIPT_PATH=%TEMP%\install-rustdesk-cosmolan.ps1"
echo Downloading %SCRIPT_URL%
powershell -NoProfile -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri '%SCRIPT_URL%' -OutFile '%SCRIPT_PATH%'"
if errorlevel 1 (
  echo Failed to download the PowerShell installer.
  pause
  exit /b 1
)
powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_PATH%"
pause
