home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!nic.umass.edu!risky.ecs.umass.edu!umaecs!legarret
- From: legarret@ecs.umass.edu
- Newsgroups: comp.lang.pascal
- Subject: Errorlevel codes from DOS program.
- Message-ID: <19101.2b0d224e@ecs.umass.edu>
- Date: 20 Nov 92 17:37:18 GMT
- Lines: 28
-
- Hello everyone;
- I'm writng a program that executes a secondary program through
- the EXEC command. I need my program to be able to recognize the
- errorlevel codes sent by the secondary external program when
- its finished. (eg., 1 = error, 0 = success).
-
- Heres what I have so far:
-
- Exec (program#2);
- If IOResult(from_program#2) <> 0 Then
- Procedure#1
- Else
- Procedure#2;
-
- But, to my knowledge, IOResult will only report errorlevel codes based on
- 'program#2' execution. (0 = successful exec., 1 = error during execution).
-
- Is there any way I can acomplish this?
-
- BTW, I'm using TP 5.0 but will be upgrading to 6.0 next week...
-
- Thanks for any help.
-
- ...Carlos
- =-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=
- Carlos Legarreta | E-Mail: legarret@ecs.umass.edu
- Univ. of Massachusetts / Amherst |
- =-=-=-==-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
-