@echo off
setlocal enabledelayedexpansion

cd /d "%~dp0"

net session >nul 2>&1
if %errorlevel% neq 0 (
    powershell -Command "Start-Process cmd -ArgumentList '/c \"%~0\"' -Verb RunAs"
    exit /b
)

set INSTALLER=Interception\command line installer\install-interception.exe

if not exist "%INSTALLER%" (
    echo Error: Installer not found
    pause
    exit /b
)

echo.
echo Preparing to start Interception driver installation...
echo Press any key to continue...
echo.
pause

echo.
echo Starting installer window...
echo Please wait...
echo.

"%INSTALLER%"

echo.
echo Installer window closed.
echo If installation was successful, please restart your computer.
echo.
pause
