home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!mimsy!nocusuhs!nmrdc1!frmug!lill!vanney.raphael
- From: vanney.raphael@lill.frmug.fr.mugnet.org (Vanney Raphael)
- Newsgroups: comp.lang.pascal
- Subject: RE: CHECKING TO SEE IF A
- Message-ID: <1025.6.uupcb@lill.frmug.fr.mugnet.org>
- Date: 23 Dec 92 21:32:00 GMT
- Reply-To: vanney.raphael@lill.frmug.fr.mugnet.org (Vanney Raphael)
- Organization: Li'LL BBS - Paris, France
- Lines: 26
-
- Hi !
-
- TS>>I am currently writing a program (TP6) that has a DOS shell option.
- TS>>The question I have is this: how do I tell if the program is
- currently
- TS>>shelled to DOS to keep the user from trying to execute the program
- again
- TS>while
- TS>>in the shell?
-
- TS>1) Test for an environment variable, say "running" and don't allow
- TS>the shelling if it is on.
- TS>2) Set the environment variable "running" from within your program.
- TS>3) Let your program do its devious deeds :-).
- TS>4) Turn off the "running" environment variable.
-
- Better not run COMMAND.COM with that trick : it would create a fully
- new evironment variables set...
- Anyway, if you don't have to ruuun batch files, this may be a solution.
-
- Alp, Raphael.
-
- * OLX 2.1 TD * Believe it or not !
- --- FMail 0.92
- * Origin: ICEBERG - La Garenne * FRANCE * Tel:(33)-1-47699261 (2:320/1)
-
-