@echo off
:: Vérifie si le script est exécuté en tant qu'administrateur
net session >nul 2>&1
if %errorlevel% neq 0 (
    echo [!] Elevation requise. Relance avec les droits administrateur...
    powershell -Command "Start-Process '%~f0' -Verb runAs"
    exit /b
)

:: Lancer le premier script PowerShell (suppression partition 5 + extension C)
powershell -ExecutionPolicy Bypass -NoProfile -File "removeP4+resizepartsystem.ps1"

:: Lancer le second script PowerShell (renommage du PC)
powershell -ExecutionPolicy Bypass -NoProfile -File "ChangeComputerName.ps1"

pause
