@echo off
setlocal
cd /d "%~dp0"
set "LOG=%~dp0uninstall-tasks.log"

echo Uninstalling Windows scheduled tasks...
echo Uninstalling Windows scheduled tasks... > "%LOG%"
echo Project: %CD% >> "%LOG%"
echo. >> "%LOG%"

powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\uninstall-windows-tasks.ps1" >> "%LOG%" 2>&1
type "%LOG%"

echo.
echo If there is no error above, tasks are removed.
echo If there is an error, send Codex a screenshot.
pause
