@echo off
setlocal
title ImageAnywhere Field Verify
if not exist "%~dp0Verify-ImageAnywhereField.ps1" (
  echo.
  echo  Please EXTRACT the ZIP first: right-click the downloaded ZIP, choose
  echo  "Extract All...", open the extracted folder, then double-click this again.
  echo.
  pause
  exit /b 1
)
echo.
echo  Checking this machine's ImageAnywhere field setup. Keep this window open.
echo.
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Verify-ImageAnywhereField.ps1" -RequireStartupTask
if %errorlevel% neq 0 goto :failed
echo.
echo  VERIFY PASSED. Results are in field-verify-result.json and field-verify-log.txt.
echo.
pause
exit /b 0
:failed
echo.
echo  VERIFY FAILED - this machine's ImageAnywhere setup is NOT healthy.
echo  Send field-verify-result.json and field-verify-log.txt from this folder to support.
echo.
pause
exit /b 1