Path: utzoo!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!rpi!clarkson!grape.ecs.clarkson.edu!levericw From: levericw@cheetah.ece.clarkson.edu (Walden Leverich) Newsgroups: comp.os.msdos.programmer Subject: Re: Disabling an Internal DOS Command Message-ID: Date: 4 Mar 91 19:30:04 GMT References: <1991Mar4.151301.12925@cbnewsk.att.com> Sender: @grape.ecs.clarkson.edu Reply-To: levericw@clutx.clarkson.edu (Walden Leverich) Distribution: usa Organization: /home/cheetah.ece/levericw/.organization Lines: 62 In-Reply-To: konopka@cbnewsk.att.com's message of 4 Mar 91 15:13:01 GMT > Path: clarkson!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsl!cbnewsk!konopka > From: konopka@cbnewsk.att.com (raymond.konopka..jr) > Newsgroups: comp.os.msdos.programmer > Date: 4 Mar 91 15:13:01 GMT > Distribution: usa > Organization: AT&T Bell Laboratories > Lines: 15 > I have written an enhanced Change Directory command for DOS and I > would like to call it cd, however, since 'CD' is already an internal > command, command.com always executes the internal command. Is > there any way to disable a DOS internal command, specifically 'CD'? One alternative would be to run JP Software's 4DOS. It is a replacement for command.com and if you can swap to hard drive, EMS or XMS memory, takes as little as 4K of precious DOS memory. Remember this is a replacement for command.com, so this is not 4K additional, but rather about 25K less than command.com takes. As for why it is an alternative: You can tell 4DOS to disable any of its internal commands. The example they give is the disabling of their internal LIST command, so you can run your own LIST command. But he same thing should work with the CD command. Then just put CD.EXE (or .COM) in you path, and you should run you program when you type CD. Also, perhaps you could patch your copy of command.com and rename the CD internal command to something else. Then when command.com reads its internal list of commands, it will not find CD and therefore it will try to execute it as a program. I am not sure if this will work, I have not tried it. If you try it, make sure you have a *BACKUP* copy of command.com. > Question #2: > Is there any way to set the state of the NumLock key. I already know > how to detect the state of the key, but what I really need to do is > set it to be either on or off. Any help would be appreciated. You can read the status from BIOS, you may also be able to SET the status by playing with the settings in BIOS. (Obviously a RAM copy of BIOS.) Anyone on the net care to comment on the feasibility of this? I have not tried it myself, but would be interested in the answer. > Thanks in advance > Ray Konopka > konopka@ihlpm.att.com You are welcome in retrospect. -Walden -- --------------------------------------------------------------------------- Walden H. Leverich III | Inet: levericw@clutx.clarkson.edu ECE Dept. | CServ: 73237,2212 <- checked weekly Clarkson University | SnailMail: Software Solutions | PO Box 763 | Potsdam, NY 13676-0763 #include --------------------------------------------------------------------------