I am currently running an EXE application which is called from a bat file with some other exes. What iam trying to do is i want to return a value from EXE and pass it to an other EXE in bat file. I modified Main in my console to return type as an integer but unable to access value in Bat file except in ERRORLEVEL which i dont want to do as it may erase any potential errors. If i use ERRORLEVEL to capture return value for instance an error occured and it returns a error integer, how can i distinguish between the integer value which iam returning and this value. Please let me know your input on this.
@echo off
set PATH=%PATH%;C:\Scripts
Bat File:
TestConsoleApplication.exe
ECHO %ERRORLEVEL% -- Want to capture here return value of EXE dont want to do it using ERRORLEVEL