@echo off :: Arch + Windows Dual-Boot Helper (Windows Side) - Launcher :: This batch file launches the PowerShell script with admin privileges setlocal EnableDelayedExpansion echo. echo ============================================================ echo Arch + Windows Dual-Boot Helper (Windows Side) echo ============================================================ echo. :: Check for admin privileges net session >nul 2>&1 if %errorlevel% neq 0 ( echo Requesting administrator privileges... echo. powershell -Command "Start-Process -FilePath '%~f0' -ArgumentList '%*' -Verb RunAs" exit /b ) :: Get the directory where this script is located set "SCRIPT_DIR=%~dp0" :: Check if PowerShell script exists if not exist "%SCRIPT_DIR%archwin-windows-side.ps1" ( echo ERROR: archwin-windows-side.ps1 not found in %SCRIPT_DIR% echo. pause exit /b 1 ) :: Show mode menu if no arguments provided if "%~1"=="" ( echo Choose an option: echo. echo 1. Setup - Prepare Windows for Linux installation (fresh install) echo 2. Diagnose - Check current dual-boot configuration echo 3. Repair - Fix common dual-boot issues echo. set /p "CHOICE=Enter choice (1-3) or press Enter for Setup: " if "!CHOICE!"=="" set "CHOICE=1" if "!CHOICE!"=="1" set "MODE=-Mode setup" if "!CHOICE!"=="2" set "MODE=-Mode diagnose" if "!CHOICE!"=="3" set "MODE=-Mode repair" echo. ) else ( set "MODE=%*" ) :: Run the PowerShell script with execution policy bypass echo Running PowerShell script... echo. powershell -ExecutionPolicy Bypass -NoProfile -File "%SCRIPT_DIR%archwin-windows-side.ps1" !MODE! echo. pause endlocal