From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: Re: command.com vs. cmd.exe Date: Mon, 23 Sep 2002 09:41:59 CDT Organization: Rice University, Houston TX Lines: 26 Message-ID: <3d8f2837.sandmann@clio.rice.edu> References: <3D8EBEC6 DOT 4030404 AT wanadoo DOT fr> NNTP-Posting-Host: clio.rice.edu X-Trace: joe.rice.edu 1032792760 14856 128.42.105.3 (23 Sep 2002 14:52:40 GMT) X-Complaints-To: abuse AT rice DOT edu NNTP-Posting-Date: 23 Sep 2002 14:52:40 GMT X-NewsEditor: ED-1.5.9 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > Is there in WinNT4, Win2000 and/or WinXP a line command controller > (i.e. MSDOS emulation windows controller) named COMMAND.COM, in addition > to the NT usual CMD.EXE ? Yes, but it should typically be avoided under those platforms if at all possible. In general, you should just use what's in the environment variable "COMSPEC" - which indicates if you are under CMD or command. > In that case, where is it typically stored (\WINDOWS or \WINNT) or its > subdir SYSTEM32? It's in the system32 subdirectory - but \Winnt can be named other names in the install; so you should use the "SYSTEMROOT" environment variable to find out where. > Second point: somebody (usually competent) told me that (on Win2000 > and/or WinXP) cmd.exe called a command.com when it has to handle a *.bat > file. Is that true, and under which conditions? This is incorrect. Windows 2000 and XP call CMD.EXE to process .bat files, and have an expanded syntax which can be used in them. There are some compatibility differences between CMD.EXE and command.com (some are described on the DJGPP Win2000 compatibility page) - but usually CMD.EXE behaves better.