From: Marcus Rohrmoser Newsgroups: comp.os.msdos.djgpp Subject: Re: Setting DOS environment varible with C program and export it ? Date: Mon, 26 Jul 1999 14:16:52 +0200 Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany) Distribution: world Message-ID: <379C51B4.3A77A067@gmx.de> References: <3799E8EA DOT 83585DA8 AT multimania DOT com> NNTP-Posting-Host: sun3.lrz-muenchen.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.51 [en] (X11; I; SunOS 5.5.1 sun4m) X-Accept-Language: en Lines: 7 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I once did this using a Borland 16-bit C-compiler (no protected mode). I got me the PSP-pointer, then got the parent PSP and modified it's environment-table. Things worked fine - setenv/envsort/envclear etc. But I never tested this using gcc. If you want the code, let me know. Marcus