Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!caen!uwm.edu!bionet!agate!ucbvax!bloom-beacon!eru!kth.se!cyklop.nada.kth.se!news From: d88-pfo@dront.nada.kth.se (Peter Forsberg) Newsgroups: comp.os.os2.programmer Subject: Re: '.cmd' return codes Message-ID: Date: 11 Apr 91 21:14:21 GMT References: <18503@ncratl.AtlantaGA.NCR.COM> Sender: news@nada.kth.se (Mr News) Distribution: comp Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 24 In-reply-to: tmeiners@ncratl.AtlantaGA.NCR.COM's message of 10 Apr 91 20:58:54 GMT In article <18503@ncratl.AtlantaGA.NCR.COM> tmeiners@ncratl.AtlantaGA.NCR.COM (Tedd Meinersmann) writes: I would like to get a return code from a executable file (.cmd or .exe) when I execute the file from within my 'C' code. [Text deleted] If you want to execute .EXE programs this is not a problem, use DosExecPgm with the wait option (alternatively with no wait, using DosCWait to check the exit status of the child). For .CMD files you should use DosStartSession, but I don't remember exactly how you fetch the return code. DosStartSession has a *VAST* amount of options that you can specify. -- Tedd.Meinersmann@AtlantaGA.NCR.COM (404)-623-7349 2651 Satellite Blvd. Duluth, GA 30136 Peter Forsberg (RIT & IBM Sweden) -- _______________________________________________________________________________ Peter Forsberg Royal Institute of Technology, Stockholm, Sweden. Internet: d88-pfo@nada.kth.se ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~