How to get input from a c program to a batch file as return value to access menu by selecting a number among 1 - 4 . The numbers are given as user input in c file.
For example:
:START
start cChoice.exe
IF ERRORLEVEL 1 GOTO ONE
IF ERRORLEVEL 2 GOTO TWO
IF ERRORLEVEL 3 GOTO THREE
IF ERRORLEVEL 4 GOTO FOUR
:ONE ECHO ONE Start notepad %1 exit /b %ERRORLEVEL%
:TWO ........
Help Plz. I am new in Batch..
IF ERRORLEVEL 1matches everything equal or superior to 1. Begin with 4, then 3, 2, 1