@echo off
REM Isolation Bytes — Universal Windows Installer (one-click .bat)
REM Downloads and installs Isolation Bytes automatically with UAC elevation.
REM
REM Double-click this file, or run from PowerShell:
REM   iwr https://isolation-bytes.com/download/install-windows.ps1 -UseBasicParsing | iex

set "SCRIPT_DIR=%~dp0"

REM Check if we have local files (dist\ next to this .bat)
if exist "%SCRIPT_DIR%dist\IsolationBytes.msix" (
    powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%install-windows.ps1" -Local
    exit /b %ERRORLEVEL%
)

REM No local files — download from the web
powershell -NoProfile -ExecutionPolicy Bypass -Command "iwr https://isolation-bytes.com/download/install-windows.ps1 -UseBasicParsing | iex"
exit /b %ERRORLEVEL%
