The problem is the CMD windows doesn't close automatically after each run. It asks "Press <Enter> or <Space> to Exit" at the end of running genm.exe.
cal.bat
@echo off
start genm.exe main.txt
exit
I'm a newbie of batch. I guess the problem is because that the process "Press <Enter> or <Space> to Exit" at the end of running genm.exe is build in genm.exe. So the second line in cal.bat "start genm.exe main.txt" will never finish, unless I press <Enter>. And the third line "exit" will never be processed. The tenm.exe file is written by others and I can do nothing about it. So each time I run cal.bat, a CMD window opens and not close automatically. I ended up got a lot of CMD windows and bunch of genm.exe processes in task manager.
Am I right?
How can I close the CMD windows automatically after each run, without pressing <Enter> each time?
Thank you very much!