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