Microsoft KB Archive/74578

= Using ANSI.SYS to Disable CTRL+C Key Combination =

Article ID: 74578

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft MS-DOS 5.0 Standard Edition
 * Microsoft MS-DOS 5.0a
 * Microsoft MS-DOS 6.0 Standard Edition
 * Microsoft MS-DOS 6.2 Standard Edition
 * Microsoft MS-DOS 6.21 Standard Edition
 * Microsoft MS-DOS 6.22 Standard Edition

-



This article was previously published under Q74578



SUMMARY
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 sequences.



MORE INFORMATION
To disable the CTRL+C key combination, create a file using the following steps:

 Run MS-DOS Editor. Type the following on the same line with no spaces between:

CTRL+P 027

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:

[3;0;p

 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:

type file.bat

To enable the CTRL+C key combination, replace step 3 above with the following

[3;3p

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 starts up.

Additional query words: 6.22 5.00 5.00a 6.00 6.20 nul

Keywords: KB74578

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.