home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / pascal / 7683 < prev    next >
Encoding:
Internet Message Format  |  1992-12-25  |  1.3 KB

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