Warm tip: This article is reproduced from serverfault.com, please click

Rest of script not running after calling a batch file to run?

发布于 2020-11-29 09:52:38

I have the following script batch script:

call standalone.bat

"C:\Program Files (x86)\Notepad++\notepad++.exe" "C:\Program Files\jboss-eap-6.2\jboss-eap-6.2\standalone\log\server.log"

The first command runs as expected but the script never seems to call notepad to open the server.log file.

What is the issue here?

Edit: ending of standalone.bat is:

if ERRORLEVEL 10 goto RESTART

:END
if "x%NOPAUSE%" == "x" pause

:END_NO_PAUSE
Questioner
java12399900
Viewed
0
dbenham 2020-11-29 20:41:07

Stephan likely diagnosed the problem in his question comment - standalone.bat probably terminates with an exit command. If that is correct, then you can work around the problem without modifying standalone.bat by changing
call standalone.bat
to
cmd /c standalone.bat.