From: Hans-Bernhard Broeker 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: 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 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.