I am attempting to get my script to GOTO Manual if the criteria below is not met . How ever if the get_info.bat fails and throws a error my script stops and just displays the batch file error (calling python script) . It works when the condtions are met but not on error / not met.
for /f "tokens=1* delims=" %%x in ('get_info.bat ^| find /i "agentVersion: 4"') do @set HPSAAGT=%%x
ECHO %HPSAAGT%
IF "%HPSAAGT%"=="agentVersion: 45.0.31322.0" (set AGTVERSION=45.0.31322.0) ELSE IF "%HPSAAGT%"=="agentVersion: 40.0.0.1.106" (set AGTVERSION=40.0.0.1.106) ELSE (GOTO MANUAL)