Using BREAK

Prev Next Home Home Table Of Contents Index

USING BREAK.SYS

MarxMenu comes with a device driver called BREAK.SYS. This program enhances the BREAK ON and BREAK OFF functions of DOS to prevent users from using CTRL-C to get out of batch files.

Unlike all the other similar programs this one is smart. It only kills CTRL-C if you are in COMMAND.COM but allows your applications to see CTRL-C. And, it only uses about 400 bytes of RAM.

All you have to do is add a line to your CONFIG.SYS file:

DEVICE=BREAK.SYS

If you are using BREAK.SYS with Qemm or other memory manager, load the memory manager first.

BREAK.SYS can be enabled or disabled by using the BREAK ON and BREAK OFF commands either from the command line or from batch files.

Although BREAK.SYS is better than DOS, it isn't perfect. There are still situations where you can break out of batch files. If it is important not to break out then you can use it as follows:

DEVICE=BREAK.SYS /C

Using it this way the CTRL-C key is completely disabled. Your application software will not get any CTRL-C.

BREAK.SYS has another switch /T that works like /C except that once you execute BREAK ON then it returns to smart CTRL-C handling. The idea here is that more often you need bullet proof protection while the system is booting up, but after going to the main menu you can switch to smart protection. At the end of your bootup batch files add the lines:

BREAK ON BREAK OFF

This will switch BREAK.SYS into smart mode checking.

BREAK.SYS has another feature that makes BREAK ON work better. If you use it like this:

DEVICE=BREAK.SYS /B

Then when you run BREAK ON and the users presses CTRL-\ it will break you out of programs you might otherwise be stuck in. This feature is great for software developers to use when testing code.

Prev Next Home Home Table Of Contents Index

Sponsors
Shopping
Forum
Forum
email
EMail
Index
Index
Home
Home