@echo off REM ========================================================================== REM Debug-ShopDBReporting.bat - diagnose a PC not updating its ShopDB entry. REM REM Usage (run on the problem PC): REM Debug-ShopDBReporting.bat full triage incl a live test POST REM Debug-ShopDBReporting.bat /nopost inspect log + registry only (no POST) REM Debug-ShopDBReporting.bat /mn 2001 force the machine number sent REM REM The live POST writes this PC's row to ShopDB (idempotent upsert, same as the REM scheduled reporter). Use /nopost to avoid writing. REM ========================================================================== setlocal EnableDelayedExpansion REM --- self-elevate --- net session >nul 2>&1 if %errorlevel% neq 0 ( echo Requesting administrator elevation... powershell -NoProfile -Command "Start-Process -Verb RunAs -FilePath '%~f0' -ArgumentList '%*'" exit /b ) set "PS=%~dp0Debug-ShopDBReporting.ps1" set "ARGS=" :parse if "%~1"=="" goto run if /I "%~1"=="/nopost" set "ARGS=!ARGS! -NoPost" & shift & goto parse if /I "%~1"=="/mn" set "ARGS=!ARGS! -MachineNo '%~2'" & shift & shift & goto parse shift goto parse :run powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%PS%" !ARGS! echo. pause endlocal