Solved

CTRL-C

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

Ready to trade in that old firewall?

Whether you need to trade-up to a shiny new Firebox or just ready to upgrade from whatever appliance you're using now, WatchGuard has the right appliance for you! Find your perfect Firebox today with appliance sizing tool!

Question has a verified solution.

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

In this article you will get to know about pros and cons of storage drives HDD, SSD and SSHD.
Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

630 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