@echo off
title Uninstall Paychek NinjaTrader addon
cd /d "%~dp0"
echo.
echo Close NinjaTrader first.
echo Then this script removes Paychek/Safeguard under Custom (+ optional PaychekCompanion).
echo.
REM Prefer root 4-Uninstall-Addon.bat in the public ZIP.
REM Use -File only (no extra args). Avoid -Command which breaks quoting.
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Uninstall-NinjaAddon.ps1"
set ERR=%ERRORLEVEL%
if not "%ERR%"=="0" (
  echo.
  echo Uninstall script exited with code %ERR%.
  pause
)
exit /b %ERR%
