🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2534

Re: '.cmd' return codes

#2534
From: Peter Forsberg
Date: Thu, 11 Apr 1991 21:14
24 lines
1718 bytes
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Technical Details
Message-ID: <D88-PFO.91Apr11231419@dront.nada.kth.se>
Path: arc1-ca.pugleaf.net!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
References: <18503@ncratl.AtlantaGA.NCR.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <D88-PFO.91Apr11231419@dront.nada.kth.se>
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