Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!mit-eddie!bloom-beacon!vaxeline!paul From: paul@vaxeline.COM (Paul Selkirk) Newsgroups: comp.os.msdos.programmer Subject: Re: Command.com and a message Message-ID: <1274@vaxeline.COM> Date: 6 Dec 90 01:53:32 GMT References: <67560@unix.cis.pitt.edu> <5648@uafhp.uark.edu> Reply-To: paul@vaxeline.ftp.com.UUCP (Paul Selkirk) Organization: FTP Software, Inc. Lines: 20 You could keep users from reloading your program in the following way: Set an environment variable to indicate that you've spawned a DOS shell. putenv("SHELL=yes"); In the initialization code for your program, test for the presence of this variable, and abort with an message if it's found. if (getenv("SHELL")) { puts("Type EXIT to get back to FUTURE"); exit(1); } Since the variable is only in the environment of your program an programs that it spawns (command.com), it goes away when you exit, so the user never has to know about it. Epsilon does it this way, and I heartily approve. --------------------------------------------------------------------------- Paul Selkirk paul@ftp.com FTP Software 26 Princess St., Wakefield, MA 01880