On Fri, 14 Sep 2001 08:45:16 -0400 (EDT), Thomas Mueller wrote:
> I knew DOS would run a .COM even if it were named .EXE, or an .EXE even if it
> were named .COM, but didn't really know if that extended to .BAT. DOS will run
> an .EXE in preference to a .BAT or will run a .COM in preference to an .EXE or
> ..BAT regardless of file name extension typed at the command line, as far as I
> know. I never tried to run an .EXE file misnamed .BAT. But I think DOS would
> not recognize .SCR or .PIF.
I think you are right.
> I received one Snowhite message with a base64-encoded attachment midgets.scr,
> so I extracted it, thinking it might be a script file readable as plain text.
> I found it was a non-text file but began with MZ, which I recognized as the
> first two characters of an .EXE file. Subsequently I solved the puzzle of how
> COMMAND.COM in some cases, or some .COM files in OS/2, could exceed 65536 bytes.
> They were really misnamed .EXE files.
If you re-named these SCRs and PIFs to EXEs and tried to run them in
DOS you would probably get the old "This program cannot be run in DOS
mode" error message. I haven't tried it myself, but other list
members have, and such is the result they are reporting. I don't know
if it would always be safe to conduct such experiments.
> Actually it would be possible though not usual for a text file or legitimate
> ..BAT file to begin with MZ.
Yes, of course a text file or a batch file may begin with "MZ", but
without the executable machine code following the flag "MZ", such a
file would not run as a program.
Sam Heywood
-- See our Big Gizmotimetemp at
-- http://banners.wunderground.com/banner/gizmotimetempbig/US/VA/Mt_Jackson.gif