Batch Mode Return Code by Windows

*To*: mathgroup at smc.vnet.net*Subject*: [mg64179] Batch Mode Return Code by Windows*From*: "LectorZ" <lectorz at mail.ru>*Date*: Sat, 4 Feb 2006 04:13:32 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

Hi guys, I created a package.m which I run in a batch with a runmybatch.bat. The package.m contains a bunch of initialization cells. Every cell does a calculation to be executed. The output is a graph.jpg I schedule my bat file to be run twice a day. Question: How can I configure the batch file so that if at least one cell in package.m returns an error, math.exe returns ONE and if every cell in package.m has been executed without an error - then math.exe returns ZERO. I need this to automaticly control the execution of the Mathematica jobs. Many thanks! LZ