Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpcc01!hpcuhb!hpcllla!hpclisp!defaria@hpclapd.HP.COM From: defaria@hpclapd.HP.COM (Andy DeFaria) Newsgroups: comp.lang.pascal Subject: Writing an alternate shell (COMMAND.COM)? Message-ID: <950037@hpclapd.HP.COM> Date: 20 Aug 90 16:26:16 GMT Organization: Hewlett-Packard Calif. Language Lab Lines: 35 How can one write an alternate command interpreter for DOS using TP? I need to write a very limited and restricted "COMMAND.COM" that has enough of the characteristics of COMMAND.COM that it would not crash the machine if it is used as the SHELL. I know very little about what is actually required for this. I know that COMMAND.COM has a tranisent (sp?) portion and an resident portion and I'm pretty sure that I need the same stuff but I don't know how to do it in TP. I would appreciate the help. A little background: I am trying to secure DOS from unwitting and unknowing users so as to provide a more secure environment. I have implemented a menu system to keep them out of DOS but many third party packages allow an easy door into DOS. Indeed so does the Turbo Pascal system itself. I want to restrict this so that if they try to access DOS via one of these "trap doors" they will instead be dropped into my command interpreter that will only provide them with minimal functionality if any at all. I have tried something like the following: set comspec=nodos <-- simple .bat file that says "No way" and exits. 123 <-- Lotus 123 set comspec=c:command.com <-- back to DOS But upon exiting Lotus 123 the system dies saying "Can't find COMMAND.COM, system halted". I think if I can write and alternate command interpreter I can avoid this problem as long as I provide the proper structure so that DOS is happy but I'm not sure how to do it. Also, there seems to be a market for a good alternate shell type program for DOS that could provide *a lot* more functionality then COMMAND.COM (i.e. if I could write an alternate shell to restrict functionality then it should be possible to write and alternate shell that enhances functionality). Thanks in advance for your help.