Windows 7 / Getting Started

Modifying Config.NT

The Config.NT file contains a number of entries that affect how the system works at the command prompt. At one time, the configuration file contained a wealth of device drivers and statements that defined how the command prompt used files and buffers. However, the Config.NT file rarely contains device drivers and these driver entries are normally defined by third-party software for you. Given that Server Core lacks the functionality required for an application server (which means providing complex server-based applications such as a database-based application), you may never see a driver entry in Config.NT. The following sections describe common additions you can make to the Config.NT file.

NOTE: Some people may remember Config.SYS, the file that DOS uses to perform the same configuration that Windows performs with Config.NT. In fact, some people try to move Config.SYS to the Windows environment. Fortunately, the 32-bit version of Windows accepts many older DOS commands even when it doesn't use them. For example, the FastOpen utility provides a caching feature in DOS to make directory searches faster. Even though Windows provides this file, too, it doesn't actually use the functionality and FastOpen doesn't actually perform any task. Once you move to the 64-bit versions of Windows, much of this functionality is missing completely. For example, you can't create a Config.NT file that contains a reference to the FastOpen utility.

Using ANSI.SYS to Control the Environment

The ANSI.SYS device driver provides added functionality for applications at the command prompt. By using special escape codes, you can create a character-based user interface for your batch files. You can find a good listing of ANSI escape codes at http://www.evergreen.edu/biophysics/ technotes/program/ansi_esc.htm and on the Microsoft Web site at http://www.microsoft.com/technet/archive/msdos/comm1.mspx?mfr=true. This utility uses the following syntax:

device=[Drive:][Path]ANSI.SYS [/X] [/K] [/R]

As with all device drivers that you add to the Config.NT file, you begin the ANSI.SYS entry using device= entry, followed by the drive and path to the ANSI.SYS file. The following list describes each of the command line arguments.

/X Remaps the extended keys on 101-key keyboards independently. Actually, this feature works no matter how many extra keys your keyboard has.

/K Forces ANSI.SYS to treat a 101-key (or more) keyboard like an 84-key keyboard by ignoring the extended keys.

/R Changes the line scrolling functionality to improve readability when working with screen reader programs. A screen reader program interprets the screen content and presents it using some other form of output. Normally, screen reader applications say what's on screen to help those with special sight needs understand the content.

Setting the DOS Location

This utility uses the following syntax:

DOS=[{HIGH | LOW}] [{,UMB | ,NOUMB}]

The following list describes each of the command line arguments.

HIGH | LOW Determines whether the command environment attempts to load part of itself into the High Memory Area (HMA) (HIGH) or keep all of the code in conventional memory (LOW). The default setting is LOW. Generally, you want to load the command environment into high memory to preserve more conventional memory for applications.

UMB | NOUMB Determines whether the command environment should manage the Upper Memory Blocks (UMBs) created by a UMB provider. Windows provides a UMB provider as a default. DOS users used to rely on a special program named EMM386.EXE to perform this task. The UMB argument tells the command environment to manage the UMBs, which frees additional memory for loading applications in areas other than conventional memory. The default setting is NOUMB.

Running DOS Applications Only

You can execute any kind of application you want from the command prompt. If you want to start Notepad, simply type Notepad and press Enter. However, mixing Windows and older DOS applications can sometimes cause problems. Developers wrote DOS applications with the expectation that these applications controlled the entire machine, which can cause myriad problems with Windows applications. If you have one of these older applications (and they're quite rare), you can help the DOS application execute properly by adding the NTCMDPROMPT entry to Config.NT. This entry tells the operating system to disallow Windows application execution at the command prompt, which means that the DOS application continues to feel that it owns the machine. Of course, you can start your Windows applications from another command prompt or by using any of the usual techniques, such as the Start menu.

[Previous] [Contents] [Next]