@echo off
setlocal EnableExtensions
set "OUT=%TEMP%\navigatorconnect-setup.exe"
powershell -NoProfile -ExecutionPolicy Bypass -Command "$ErrorActionPreference='Stop'; $m=Invoke-RestMethod 'https://navicon.pro/version-connect-win.json'; & curl.exe -fL --retry 3 $m.url -o '%OUT%'; if($LASTEXITCODE -ne 0){exit $LASTEXITCODE}; $actual=(Get-FileHash -Algorithm SHA256 '%OUT%').Hash.ToLowerInvariant(); if($actual -ne $m.sha256.ToLowerInvariant()){throw 'SHA-256 check failed'}" || exit /b 1
echo Downloaded and verified %OUT%
start "" "%OUT%"
