Solved

CTRL-C

Posted on 1998-09-03
1
305 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
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 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