Path: utzoo!attcan!uunet!mcvax!ukc!warwick!expya!sru From: sru@cs.exeter.ac.uk (Steve Rush) Newsgroups: comp.sys.ibm.pc Subject: Execution Order Keywords: COM EXE BAT Message-ID: <992@expya.cs.exeter.ac.uk> Date: 15 Feb 89 15:25:21 GMT Organization: Computer Science Dept. - University of Exeter. UK Lines: 36 Dear Net, I have a question about execution order in MSDOS. I beleive that commands in MSDOS are executed in the order .COM .EXE .BAT so if there are several files in the directory with the same name but with different extensions it is the .COM file that would be executed. Is there anyway to get MSDOS to execute the .EXE file instead? I have tried typing FILE.EXE but the silly operating system runs the FILE.COM anyway !! (I am using DOS 3.3) The reason for asking is that there are several EXE files no our machines and I want to do some preprocessing before the actual program is run (eg. to check parameters before running 'dangerous' software, ie check which drive has been specified before running FORMAT). My idea was to write a FILE.COM file which did my preprocessing and then run FILE.EXE to run the actual program. But what happens is that it loops, continually running my preprocessor !! Any suggestions? I have thought of renaming the program and putting my checks and the call to the actual program inside a batch file but some of the programs complain if I try to run them under a different name. Note, people will often be in the actual directory where the program is located, so I can't cheat by giving a full path name to the EXE file and putting the batch file at the start of the path. Thanks in advance for any suggestions. Steve ----------------------------------------------------------------------- S.Rush sru@uk.ac.exeter.cs University of Exeter ..!ukc!expya!sru Computer Science Dept. Prince of Wales Road, Exeter EX4 4PT.