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.
netbeans --jdkhome d:\dev\jdk
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 . . ."