Using ANSI.SYS to Disable CTRL+C Key Combination (74578)
The information in this article applies to:
• Microsoft MS-DOS operating system 5.0
• Microsoft MS-DOS operating system 5.0a
• Microsoft MS-DOS operating system 6.0
• Microsoft MS-DOS operating system 6.2
• Microsoft MS-DOS operating system 6.21
• Microsoft MS-DOS operating system 6.22
This article was previously published under Q74578
You can use the ANSI.SYS device driver to disable the CTRL+C key
combination. This is done by assigning the CTRL+C key combination to NULL.
NOTE: ANSI.SYS must be loaded in the CONFIG.SYS file to enable ANSI escape
To disable the CTRL+C key combination, create a file using the following
• Run MS-DOS Editor.
• Type the following on the same line with no spaces between:
To type this line, hold down the CTRL and P keys simultaneously and then
release them. Then hold down the ALT key while you press the 0, 2, and 7
keys on the numeric keypad.
These key combinations produce the left arrow that symbolizes the
start of the ANSI escape sequence.
• On the same line, leaving no spaces, type:
• Save this file as a batch file (for example, FILE.BAT).
• Exit MS-DOS Editor.
Type the following at the MS-DOS command prompt to disable CTRL+C:
To enable the CTRL+C key combination, replace step 3 above with the
and save the file under a different name.
By adding the TYPE command and the name of the file to the AUTOEXEC.BAT
file, you can disable or enable the CTRL+C key combination when the machine
| Modification Type:
|| Last Reviewed: