Solved

CTRL-C

Posted on 1998-09-03
1
310 Views
Last Modified: 2010-04-26
you know that in a batch file, you can stop-run the program...but is there command line that i can include in the batch file to cancel the ctrl-c command... for people wont be able to stop the batch file?

thank!
0
Comment
Question by:poutney
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 12

Accepted Solution

by:
mark2150 earned 10 total points
ID: 1010251
Nope. There's no way to totally guarentee that a batch won't be interrupted.

There are several tricks you can use like changing the STDIN device to NUL and such, but since these commands have to occur withing the batch the command redirecting STDIN itself can receive a <Ctrl Break> before it executes. So stopping the batch is just a matter of timing.

Someone will surely mention BREAK OFF, this actually doesn't eliminate the <Ctrl C> checking, it just reduces it's frequency so it's a little harder (not much) to stop.

You can also stop a program by causing a hardware fault (like opening the disk drive door while writing to floppy). This will universally trigger a "Critical Stop-Abort/Retry/Ignore" type of error that the user can break out of.

0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
Stuck in voice control mode on your Amazon Firestick?  Here is how to turn it off!!!
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question