QUOTE (PROBLEMCHYLD @ Jul 9 2007, 10:01 PM)

I was just playing around with the cmd.exe file from WinXP and renamed it to command.com
and it still works as if nothing has change.
Now i was just wondering since i renamed it to command.com will it work on Win98SE?
Hi, PROBLEMCHYLD! This is a characteristic behaviour that is inherited from good old MS_DOS:
The command interpreter can have any name. This is "by design". Moreover, it doesn't matter
whether the extention is .com or . exe, since both are known to the SO as "executable".
But probably it will stop working if you change the extention to .pdf or .txt ...
On the other hand, from the point-of-view of the program loader, if the extension is executale
it goes ahead and tries to execute the file, then checking the file format signature, to be able to
do so: if none is found it wil assume it's a .com (executable image) format and try to execute it
from the first byte, whereas if a format signature (MZ, PE, NE, LE) is found it will take the known
necessary steps to load correctly the diverse segments of the file, and then transfer control to the
address found in the program file header. By the way, MS-DOS 7.1 COMMAND.COM is, in fact, an
.exe file, as can be seen by loading it in any hexeditor and observing that the first two bytes are MZ.
The name is just a nod to older times. All this said, there remains the question of cmd.exe's depen-
dencies, which are another reason for it not to run under Win 9x. But that's another matter entirely.
In the past, there was a "fever" for replacements of the DOS command interpreter, the best know
of which was Norton Utilities's NDOS.COM (who else still remembers of it?)... HTH