From: bpmurray*STUFFER*@socrates.cgl.ucsf.EDU (Bernard P. Murray, PhD) Newsgroups: comp.os.msdos.djgpp Subject: Re: BASH as default DOS shell under Windows 98? Date: Thu, 04 Mar 1999 14:54:40 -0800 Organization: University of California, San Francisco Lines: 35 Distribution: world Message-ID: References: <7bl4kq$r29$1 AT oak DOT prod DOT itd DOT earthlink DOT net> <36de423b DOT 261027328 AT news DOT cso DOT uiuc DOT edu> NNTP-Posting-Host: mac-daddy.ucsf.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article , mvparvia AT delta DOT hut DOT fi (Mikko V.I. Parviainen) wrote: > [On copying bash.exe as command.com] > locke AT mcs DOT net (Peter Johnson) writes: > >Um.. that would be a BAD idea. Considering that command.com is NOT > >an .exe file (.coms and .exes are loaded differently by DOS). > Actually, I have the impression that command.com has been an exe file > since at least MS-DOS 5.0. DOS determines the type of an executable > from its internal structure, not file system name. > If I recall correctly, one could run a file with any name as an > .exe-file, if only all relevant data is in the right place. > Mikko Parvianen > pare AT iki DOT fi Yes, just check the first two bytes of a program and if they are "MZ" it will be loaded as a .EXE and if not then as a .COM (the extensions only tell DOS that it is actually a program). (I used to know whose initials M.Z. were) If you take a .EXE an change one of those bytes DOS will usually complain that the program is "too big to fit in memory" (as .COM files have to be single segment so < 64k). I don't have a PC handy at the moment to check COMMAND. Also, if I remember correctly, DOS only uses the environment variable to find the shell if it can't locate it in the root directory of the boot drive so simply moving COMMAND.COM to another location should be enough (not tested though). Bernard -- Bernard P. Murray, PhD Dept. Cell. Mol. Pharmacol., UCSF, San Francisco, USA