home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / ibm / pc / misc / 16215 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  1.7 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!biosci!ucselx!crash!pro-storm!brogers
  2. From: brogers@pro-storm.cts.com (Brian Rogers)
  3. Newsgroups: comp.sys.ibm.pc.misc
  4. Subject: Re: DISABLING  CTRL-C  in BAT FILES...
  5. Message-ID: <lu16104@pro-storm.cts.com>
  6. Date: 30 Dec 92 10:01:26 GMT
  7. References: <C01pBA.I4J@ccu.umanitoba.ca>
  8. Organization: ProLine [Pro-Storm] -- Dallas, TX -- 214/644-5113
  9. Lines: 23
  10. In-Reply-To: ummalik@ccu.umanitoba.ca (Ijaz Rashid Malik)
  11.  
  12. In <C01pBA.I4J@ccu.umanitoba.ca>
  13. ummalik@ccu.umanitoba.ca (Ijaz Rashid Malik) writes:
  14. >
  15. >Does anyone know of ANY way that would disable Ctrl-C &/or Ctrl-Break in
  16. >a BAT file. I have to shell to dos from a database app. (Paradox) to run
  17. >a BAT file and if user hits Ctrl-C during BAT file processing, every thing
  18. >gets ruined. I have to catch it somehow...
  19.  
  20. It's been my experience that there's no real way to disable the Ctrl-C
  21. checking during a batch file -- HOWEVER, adding "BREAK=OFF" to your
  22. config.sys AND not doing any input or output from the batch file (eg: with
  23. the PAUSE command) will pretty much make sure that the batch file is not
  24. interrupted.  Still, this does not make sure that executables (eg: MORE.COM,
  25. ASSIGN.EXE, and utilities) run without being interupted by Ctrl-C.
  26. If you have to use commands such as COPY or others that produce output,
  27. redirect their output to nul (eg: COPY COMMAND.COM D:\ > NUL).
  28.  
  29. Hope this helps.
  30.  
  31. ------- Brian Rogers -------+-------------- The Angel of Java ----------------
  32.  "Staying Sane is Hard....  | Internet: brogers@pro-storm.cts.com          
  33.   Drinking Coffee is Easy!" |   Bitnet: brogers%pro-storm.cts.com@nosc.mil
  34. ----------------------------+-------------------------------------------------
  35.