www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/07/19/08:41:28

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: passing variable to calling .bat file
Date: 19 Jul 2002 10:53:38 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 21
Message-ID: <ah8r3i$skr$1@nets3.rz.RWTH-Aachen.DE>
References: <3d37ebcc$0$25810$91cee783 AT newsreader02 DOT highway DOT telekom DOT at>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1027076018 29339 137.226.32.75 (19 Jul 2002 10:53:38 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 19 Jul 2002 10:53:38 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Florian Sukup <f DOT sukup AT mobilkom DOT at> wrote:
> Hi,

> I am calling in a .bat file an .exe (C-source and compiled with djgpp).

> I want to pass values from the C-program to variables in the calling script
> such that I can work with them after I called this .exe.

Then, for maximal portability, you'll have to write those values to a
temporary .bat file, and 'call' that from the controlling one after
the .exe is done.  

Commands can't usually change environment variables as seen by another
process.  Not even in DOS.  There are undocumented methods of doing
that, of course, but unless there's very pressing need, you should
avoid those.


-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019