From: Martin Str|mberg Newsgroups: comp.os.msdos.djgpp Subject: Re: Incorrect resolution of COMSPEC environment variable on WinNT Date: Fri, 29 Jun 2001 17:57:15 +0000 (UTC) Organization: University of Lulea, Sweden Lines: 24 Message-ID: <993837435.475448@queeg.ludd.luth.se> References: <3B3CADA3 DOT 4000506 AT earthlink DOT net> X-Trace: news.luth.se 993837435 28747 130.240.16.109 (29 Jun 2001 17:57:15 GMT) X-Complaints-To: abuse AT luth DOT se User-Agent: tin/pre-1.4-981225 ("Volcane") (UNIX) (SunOS/4.1.4 (sun4m)) Cache-Post-Path: queeg.ludd.luth.se!unknown AT father DOT ludd DOT luth DOT se X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Jonathon Merz wrote: : Is this a bug or am I missing something? : With the following code: : main() : { : char *comspec_value = getenv("COMSPEC"); : printf("%s\n", comspec_value); : } : When compiled with DJGPP's gcc on WinNT 4, the output is: : C:\WINNT\SYSTEM32\COMMAND.COM In that same window type "set" and verify that COMSPEC really is what you think it is. I've noticed that if you start by a .BAT file I'd get C:\WINNT\SYSTEM32\COMMAND.COM (not on NT but on a similar OS). Right, MartinS