Supposed that I have 2 console apps called A & B. A will spawn B through Process.Start() & B returns ret code to A when it is done. Normally, if I run A directly from console B's ret code will be returned correctly. But, if I run A through a batch file, errorlevel will always be 0 regardless what error code returned from B is. What wrong with the errorlevel value in this case?
Thanks.
Well, actually there was a mistake in B code which returned 0 for some cases.