Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!bloom-beacon!eru!luth!sunic!mcsun!ukc!tcdcs!wsl!john From: john@wsl.UUCP (John Allen on wsl) Newsgroups: comp.sys.ibm.pc Subject: Re: .COM and .EXE files Message-ID: <270@wsl.UUCP> Date: 20 Oct 89 18:11:51 GMT References: <00092@citasim.UUCP> <253B310B.23002@maccs.dcss.mcmaster.ca> Reply-To: john@wsl.ie (John Allen on wsl) Organization: Workhorse Systems, Dublin, Ireland Lines: 20 Summary: Expires: Sender: Followup-To: In article <253B310B.23002@maccs.dcss.mcmaster.ca> cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) writes: > > The loader in COMMAND.COM recognizes only two types of files: .COM and >.EXE. When a program tries to shell out, it calls the loader, which tries to >figure out what the *&$% to do with a .FOO file. You don't have this problem >on bootup because it isn't the loader that's loading COMMAND.COM (or >FIZZGIGG.FOO) ... at boot-time, all it does is a straight binary load of >whatever file you tell it to load. It will load and try to execute a >text file if you really want it to. > The loader in COMMAND.COM is only used on two occasions:- 1. When issuing a command at the prompt. (it also recogizes .BAT) 2. When execing COMMAND with a /C The MS-DOS exec/load program functiion call will load the file specified and execute it. This function requires the full path name. Therefore any program that provides a shell out faciltiy must use the COMSPEC environment variable or (very bad programming) hard code the name "COMMAND.COM" directly into the app. All programs that shell out do not necessarily use COMMAND.COM.