这个问题有几点不够明确:
starter.bat:
@echo off
echo Start yourScript.bat:
start "" /W yourScript.bat
echo Value returned from the script: %errorlevel%
if %errorlevel% neq 12345 ECHO execute exit.exe
Run Code Online (Sandbox Code Playgroud)
yourScript.bat:
@echo off
echo I am the script.bat
set /P var=input value:
rem Terminate normally:
exit 12345
Run Code Online (Sandbox Code Playgroud)