@echo off setlocal enabledelayedexpansion set FILE=%TEMP%\wuresultcode.log if not exist "%FILE%" ( exit /b 0 ) set /p LINE=<"%FILE%" exit /b %LINE%