WinRepair/Run WinRepair.bat
Ryan 34dbb7f4f2 v1.0.0 - WinRepair Utility
Initial upload of WinRepair in its current working, fully featured state!
2026-02-17 05:33:00 +00:00

28 lines
1.1 KiB
Batchfile

@echo off
title WinRepair Launcher
:: ═══════════════════════════════════════════════════════════════
:: WinRepair Launcher
:: Handles UAC elevation + bypasses execution policy
:: ═══════════════════════════════════════════════════════════════
:: Check for admin rights
net session >nul 2>&1
if %errorlevel% neq 0 (
echo Requesting Administrator privileges...
powershell -NoProfile -Command "Start-Process cmd.exe -ArgumentList '/c \"\"%~f0\"\"' -Verb RunAs"
exit /b
)
:: We are admin — change to script directory and run
pushd "%~dp0"
echo Starting WinRepair...
powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\WinRepair.ps1"
:: If PowerShell exits with an error, show it
if %errorlevel% neq 0 (
echo.
echo ERROR: WinRepair exited with error code %errorlevel%
echo Check WinRepair_Error.log for details.
pause
)
popd