🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7474

Re: Equivilent of UNIX exec shell cmd

#7474
From: Michael Spencer
Date: Wed, 06 Jan 1993 18:12
30 lines
1402 bytes
PROBLEM: How do you call a batch file from a C program
	    without leaving the batch file "live" ?

ANSWER:  You can't.

WORK AROUND:
	    1) The batch file name + path MUST be less than 16 chars
	    2) Push the batch file name on the keyboard stack 
		  (requires 286 or better).
         3) Terminate the C program
	    4) The batch file on conclusion calls the C program with 
		  an argument which places the program in the proper
		  position.
 
   What happens is that the C program terminates, command.com
looks for input, the keyboard stack provides the input, the batch
file is called by the opSys, and the final action of the batch file
is to recall the C program. Perpetual motion.

	Note: (1) Some keyboard stacks may be larger than 16 chars
			but you can't count on this.
		 (2) The chars pushed on the keyboard stack are NOT
			ASCI, they must be keyboard codes

					Mike Spencer
					spencer@cats.ucsc.edu
 

D
Technical Details
Message-ID: <1if7f4INNg44@darkstar.UCSC.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!gossip.pyramid.com!olivea!hal.com!darkstar.UCSC.EDU!cats.ucsc.edu!spencer
References: <1992Dec31.142534.15978@msw>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gossip.pyramid.com!olivea!hal.com!darkstar.UCSC.EDU!cats.ucsc.edu!spencer
From: spencer@cats.ucsc.edu (Michael Spencer)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Equivilent of UNIX exec shell cmd
Message-ID: <1if7f4INNg44@darkstar.UCSC.EDU>
Date: 6 Jan 93 18:12:52 GMT
References: <1992Dec31.142534.15978@msw>
Organization: University of California, Santa Cruz
Lines: 30
NNTP-Posting-Host: si.ucsc.edu