Message-ID: <379B4AE4.E6EBE8CD@multimania.com> Date: Sun, 25 Jul 1999 13:35:32 -0400 From: Sylvain VIART X-Mailer: Mozilla 4.04 [en] (Win95; I) MIME-Version: 1.0 Newsgroups: fr.comp.os.msdos,comp.os.msdos To: djgpp AT delorie DOT com Subject: Setting DOS environment varible with C program and export it ? Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Reply-To: djgpp AT delorie DOT com Hi, I'm writing CGI script in perl, and for debugging from command line, under win95, I need to set some environment variable with an equal sign inside its value. DOS seem to be unable to do such simple thing. So I try to do it in C (DJGPP). I use the standard function setenv() getenv(), but I can export what is done during the program to the upper shell. Is there a way for doing such thing ? Currently, I've written a wrapper which set var and run the script passed as argument or from a file... What I want is to recreate a setenv command. So I just have to do : setenv QUERY_STRING "pattern=HTML" and the environment variable is updated (or created) to this new value. Any idea ? May be creating the var with batch file, and keeping modifications done by the program... Sylvain. -- Sylvain VIART - Computer scientist - Programmer analyst -+= -------------------- * --------------------- =+- Editor : VIM - 5.3 Win32 VIM - 5.4o Linux OS : Win95 Linux kernel 2.0.29 (Debian 1.3.1) -+= -------------------- * --------------------- =+- Je suis présentement à Montréal MAILTO:viarts AT jsp DOT umontreal DOT ca