How to Work with Batch Files
For information on how to work with batch files, see the following:
Disable Input
Redirect Output
Use Command Line Exit Codes