home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / msdos / programm / 8614 < prev    next >
Encoding:
Text File  |  1992-08-18  |  2.0 KB  |  56 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!usc!sol.ctr.columbia.edu!destroyer!ubc-cs!yogi
  3. From: yogi@cs.ubc.ca (Yossi Gil)
  4. Subject: Re: A batch programming contest for you
  5. Message-ID: <1992Aug19.065119.10003@cs.ubc.ca>
  6. Sender: usenet@cs.ubc.ca (Usenet News)
  7. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  8. References: <1992Aug18.052017.3758@uwasa.fi>
  9. Date: Wed, 19 Aug 92 06:51:19 GMT
  10. Lines: 44
  11.  
  12. ts@uwasa.fi (Timo Salmi) writes:
  13.  
  14. >As you might know I have a large collection of batch files and
  15. >tricks garbo.uwasa.fi:/pc/ts/tsbat36.zip. I am always looking for
  16. >useful new information for it.
  17.  
  18. Well, I have this other discovery that I try to offer every year
  19. or so, but it still remains unnoticed. I hope that you will add
  20. this to your tips&tricks so that I will not have to pound on this
  21. again in a year from now. 
  22.  
  23. How to prevent ctrl-breaks during execution of autoexec.bat? 
  24. ------------------------------------------------------------
  25. The "ctty nul" command is a well known trick, but it doesn't hold
  26. if the user types in ^C quickly. One usually puts "@echo off" at the
  27. beginning of the batch file. These leavs even more time to the
  28. intruding user to break. 
  29.  
  30. My trick is to create
  31.     shell=command.com /p nul line in my config.sys file. This will
  32. make command.com start with the nul device as its standard
  33. input/output. It is undocumented, but worked in all of the many dos
  34. versions I have tried it on.
  35.  
  36. And yet another relatively unknwon features of COMMAND.COM. Did you
  37. know that the following would work? Can you figure out what it will
  38. do?
  39.  
  40.     <NUL> con ver 
  41.  
  42. as well as
  43.  
  44.     <CON> nul vol 
  45.  
  46. not mentioning
  47.  
  48.     if not if == not shift else ; endif 
  49.  
  50. These may prove useful to encrypt your batch files. 
  51. --
  52. Joseph (Yossi) Gil                 {alberta,uw-beaver,uunet}!ubc-cs!yogi
  53. Dept. of Computer Science          yogi@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
  54. 6356 Agricultural Road., Univ. of B.C.,             Tel: +1-604-822-8175
  55. Vancouver, British Columbia, V6T 1Z2, Canada.       Fax: +1-604-822-5485
  56.