@echo off
cd /d "%~dp0"
set "PS=%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe"
if not exist "%PS%" set "PS=powershell"
net session >nul 2>&1
if %errorlevel% neq 0 (
  "%PS%" -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
  exit /b
)
"%PS%" -NoProfile -ExecutionPolicy Bypass -Command "Get-ChildItem -LiteralPath '%~dp0' | Unblock-File -ErrorAction SilentlyContinue"
"%PS%" -NoProfile -ExecutionPolicy Bypass -File "%~dp0Clean-CDrive.ps1"
pause
