I have a script that is supposed to sit there, happily running in a command window, spewing out data... but I want the window to close automatically when the script finishes or crashes. The script is auto-restarted by other processes and I don't want my processing machines to become polluted with unused terminals.
In a pinch, I have considered setting up the scripts as windows services that dump their output to a file and just having the command windows "tail -f" the output files, but I"d prefer not to make major changes to a system that already works well.