You are currently offline, waiting for your internet to reconnect

How to Enable ANSI.SYS in a Command Window

This article was previously published under Q101875
This article has been archived. It is offered "as is" and will no longer be updated.
ANSI.SYS can be loaded and used from the command prompt, with therestriction that it can run only in the context of the MS-DOS subsystem.Windows NT does not support ANSI escape sequences in Win32 Consoleapplications. To load ANSI.SYS, add "device=c:\winnt\system32\ansi.sys" tothe CONFIG.NT file in the Windows NT SYSTEM32 directory.
Once ANSI.SYS is loaded, you can use any MS-DOS-based program thatmakes use of this driver. However, if you want to use ANSI.SYS tochange the look of the command prompt, you may have to perform someadditional steps.

For example, to highlight the prompt in MS-DOS command prompt, youmust add "dosonly" to your CONFIG.NT file, and run COMMAND (not CMD)from MS-DOS Command Prompt. You can then run a batch file thatincludes the PROMPT command with ANSI escape sequences to highlightthe prompt.

NOTE: While this gives the command prompt the same appearance as anMS-DOS prompt, you are now in a DOS-based command prompt, and you canno longer start non-DOS programs from the command line.

ANSI.SYS, being an MS-DOS-based device driver, can be used only in thecontext of the MS-DOS subsystem.

VT52.SYS may be used in the same manner as ANSI.SYS, with the samerestrictions.

Article ID: 101875 - Last Review: 12/04/2015 09:35:01 - Revision: 2.1

Microsoft Windows NT Advanced Server 3.1, Microsoft Windows NT Server 3.5, Microsoft Windows NT Server 3.51, Microsoft Windows NT Server 4.0 Standard Edition, Microsoft Windows NT Workstation 3.1, Microsoft Windows NT Workstation 3.5, Microsoft Windows NT Workstation 3.51, Microsoft Windows NT Workstation 4.0 Developer Edition

  • kbnosurvey kbarchive kbhowto kbinterop KB101875