@echo off
setlocal
title ORC Local Installer

set "ROOT=%~dp0"
if not exist "%ROOT%scripts\install_windows.ps1" (
  echo ORC Local installer files were not found.
  echo.
  echo Please extract the entire ZIP first, then double-click this file again.
  echo.
  pause
  exit /b 1
)

powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%ROOT%scripts\install_windows.ps1"
set "EXITCODE=%ERRORLEVEL%"
echo.
if "%EXITCODE%"=="0" (
  echo ORC Local installation finished.
) else (
  echo ORC Local installation failed with exit code %EXITCODE%.
)
echo.
pause
exit /b %EXITCODE%
