Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ames!elroy!hacgate!ashtate!dbase!marc From: marc@dbase.UUCP (Marc Schifer) Newsgroups: comp.sys.ibm.pc Subject: Re: Execution Order Summary: Execution order-(Rename the exe File.) Keywords: COM EXE BAT Message-ID: <22@dbase.UUCP> Date: 17 Feb 89 19:07:21 GMT References: <992@expya.cs.exeter.ac.uk> Organization: Ashton Tate Devlopment Center Glendale, Calif. Lines: 47 In article <992@expya.cs.exeter.ac.uk>, sru@cs.exeter.ac.uk (Steve Rush) writes: > 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 > Try renaming the .EXE file to something else (ie XFILE.EXE) this way you eliminate the looping.(of course it still allows someone to execute the original file on its own.) IF your com file is calling the exe file internaly you may try using some nonstandard characters in the second files name to slow down the average user from accessing the file. hope this helps marc ------------------------------- (Discalimer.-I ain't claiming nothing!) [P.S. Could someone let me know if this is acctualy getting out on to the net.?]