Just a small post you may find useful if you are as annoyed as I was of a command window left open after execution of a bat file.
I had to call an exe with some options. So I wrote a bat for it. But after executing the bat file, it always kept a command window open until I explicitly close it or the executed program finishes. Actually the command window remains open till the control is returned from the exe to bat again. Point to be noted is EXIT doesn't help in this case as it's call is also deferred until control is returned back.
eg.
start-netbeans.bat
netbeans --jdkhome d:\dev\jdk
putty-to-server.bat
d:\programs\putty -pw password username@ip-addrs
Use start before the command so your bat calls the exe and continues its execution i.e. doesn't wait for the exe to complete the execution
start netbeans --jdkhome d:\dev\jdk
start d:\programs\putty -pw password username@ip-addrs
You can use pause command for "Press any key to continue . . ."