From: Wilfried Hennings Newsgroups: comp.os.msdos.djgpp Subject: Re: getenv problem Date: Tue, 17 Dec 2002 11:42:28 +0100 Organization: Forschungszentrum Juelich GmbH Lines: 33 Message-ID: <8gvtvuo1qe2qi661n15lf6u1vt69ar7d5j@4ax.com> References: NNTP-Posting-Host: mut011 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: zam602.zam.kfa-juelich.de 1040121711 389519 134.94.127.14 (17 Dec 2002 10:41:51 GMT) X-Complaints-To: usenet AT fz-juelich DOT de NNTP-Posting-Date: Tue, 17 Dec 2002 10:41:51 +0000 (UTC) X-Newsreader: Forte Agent 1.92/32.572 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "A. Sinan Unur" wrote: > I posted the above code in response to another problem. After posting, I > noticed that the string getenv returns for TEMP does not match the value > of TEMP on my system. Typing set shows: > > TEMP=C:\DOCUME~1\asu1\LOCALS~1\Temp > TMP=C:\DOCUME~1\asu1\LOCALS~1\Temp > > whereas getenv("TEMP") returns c:\windows\temp. > > I am using XP Pro. I do have the v2.03 refresh distribution installed. > What might be the reason? Right click on "My computer" on your desktop, then "properties", "extended" (or what else is it in English? I have the German WinXP), "environment variables". There I (logged in with admin rights) see two sets of variables: User variables and system variables. "TEMP=C:\DOCUME~1\asu1\LOCALS~1\Temp" comes from the user variables. "TEMP=c:\windows\temp" comes from the system variables. If I open a command prompt, I get the "user" temp. But if the djgpp program opens a new process, what variables does this get??? I don't know! And I myself would like to be a little bit more enlighted in this respect... Regards, -- email me: change "nospam" to "w.hennings" Dipl.-Ing.(=M.Sc.Eng.) Wilfried Hennings c./o. Forschungszentrum (Research Center) Juelich GmbH, MUT All opinions mentioned are strictly my own, not my employer's.