Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I recently bought a laptop with Windows XP Pro installed. All my other PCs run Windows 98 SE -- and I've been avoiding XP because I "knew" I would have DOS-window "compatibility issues". But nobody has been documenting these things, not even in Microsoft's massive "Knowledge Base".
First off, let me say that my opinions are atypical, my views are certainly "old fashioned". I worked as a software engineer in Silicon Valley for 30 years (1969-1999) and, while I am now "retired", I do keep up-to-date on technology. And I write programs for my own use, mainly in Java and C/C++.
While I do use numerous GUI-style applications (Web browsers, Scientific Word, etc.) much of my computing is done from the "command line" (I *SAID* I was "old fashioned"). My favorite source code editor is DOS-based, and one can still run compilers, linkers, the Java interpreter, and most other programming tools from the command line. (I have no use for an "IDE", they are "props for dummies".)
Here is what I have discovered, with some friendly help from Microsoft tech support, about Windows XP's "Command Prompt" windows:
Windows XP includes TWO command-line processors, CMD.exe (with an NT heritage) and COMMAND.COM (with a DOS heritage). Unfortunately, the COMMAND.COM in Windows XP is all but unusable, because
• The "dir" command in COMMAND.COM does not display long filenames, and has no option to display them. (In fact, I suspect that Windows XP COMMAND.COM may not support long filenames at all.)
• The "doskey" included with Windows XP does not work with COMMAND.COM (and its functionality appears to be "built-in" to CMD.EXE; I suspect that the "doskey" command in Windows XP exists only as a "change of parameters" interface to CMD.EXE). This means that there is no usable command-line editing, and no command history recall, when using COMMAND.COM.
• Many common, familiar commands simply are not supported under COMMAND.COM. For example, the "more" command is not supported!
I suspect that the only reason Microsoft included COMMAND.COM in Windows XP is for compatibility with DOS-based programs that "spawn" it to execute simple DOS commands. It certainly is not usable as an actual command-line processor! The CMD.exe processor, on the other hand, is fairly robust, but it lacks one feature that is (or was) important to me: support for ANSI.SYS. For many years, I have customized my command prompt in DOS (and DOS windows) as follows:
prompt ~[36m$p ~[33m$q$q$q$g ~[32m
where the "~" is an Esc character (hex 1B). With ANSI.SYS installed, this results in an attractive multi-colored prompt (in cyan and yellow) and causes all the rest of the text (user input, command output) to be in green on a black background. Ironically, ANSI.SYS is still supported in Windows XP -- but ONLY under the unusable COMMAND.COM, not in conduction with CMD.EXE! The one nice thing Microsoft did in this area is they added a new "$s" token to the "prompt" command. That makes it possible to reproduce the "trailing blank" in my command prompt (formerly, the trailing blank was "forced" by the trailing ANSI.SYS escape sequence " ~[32m"). The color-capability is lost, however, as the Windows XT version of my command prompt is reduced to:
prompt $p $q$q$q$g$s
The documentation for CMD.exe describes a "/a" option to enable support for ANSI escape sequences. However, I have tried this option and it does not work -- at least, not with escape sequences embedded in the command prompt. Perhaps it works with output from DOS application programs.

That's great but...what's your question???
I read the whole post and still can't figure out what your question is.
-=Bryan=-

This was not a "question" -- it was an answer. I wanted to post this info because I have not found it documented anywhere -- and I spent an entire holiday weekend figuring it out. Hopefully, it will save somebody else some time.

I think it is safe to say we were just having some fun. We knew what you were doing and for those who understand at that level will appreciate it I'm sure.
Jimi_l

G'day William, I appreciate your input about Ansi.sys, I used to load it in Config.sys in the 'good old days' so I could have a green dos prompt [ $e[1;32;40m$p$g ] and different coloured lines for each device/program loaded [without the prompt at the start of the path] when I booted up, alot better than stark white-on-black. It may be possable to change your prompt in the Autoexec via the environment settings but nowhere do I see how to load Ansi.sys from there unless it auto-loads. I'm no exponent of it at all but I do like to dabble to try things out.
Multi-coloured prompt aye? might try that out in my 95 machines.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |