5.713 bytes

Service Hints & Tips

Document ID: DSET-3FDCC6

Aptiva - Colors at the DOS Prompt

Applicable to: United States

The normal colors for a DOS session are white characters on a black background. This will work for most all computers, whether they are desktop or laptop systems.

If you would like to add some colors to the session, you can do so by installing the ANSI.SYS driver in CONFIG.SYS and then modifying the PROMPT statement in AUTOEXEC.BAT to achieve the effect you'd like.

To do this, edit the CONFIG.SYS file (using the EDIT command in MS-DOS or the E command in PC-DOS*), and locate the last DEVICE= or DEVICEHIGH= statement in the file. Add one of the following lines right after that statement:

DEVICE=C:\DOS\ANSI.SYS

OR

DEVICEHIGH=C:\DOS\ANSI.SYS

Save the change and reboot the system for the change to be effective. If your system reboots to Windows, exit Windows and go to the DOS prompt, where you can now experiment with colors to find the most effective arrangement for your needs.

Here are some sample commands you can try:

1. PROMPT $p$g

This is the standard DOS prompt, showing the name of the current drive and directory, followed by a right-facing arrow. Typically, this will be C:\> and it will be displayed in the default white characters on a black background.

2. PROMPT $e[1;33;40m$p$g

This will display all characters at the DOS prompt in red. Try $E[32;40m$p$g to display all characters in green, or $E[36;40m$p$g to display all characters in cyan (light blue).

3. PROMPT $E[36;40m$D $T [$P]$E[37;40m$_$Q$Q$G

This will display a prompt with the date, time, and current directory in cyan, followed by a second line starting with ==> in white characters. All remaining output characters will be white on a black background.

You can try other color variations as well. Enter the command: HELP ANSI.SYS at the DOS Prompt and look for the color tables to find the designations for other colors.

Once you find the combination that suits you, edit the AUTOEXEC.BAT file and replace your current PROMPT line with the combination you'd like to have on your next bootup. If you don't have a PROMPT line in your current AUTOEXEC.BAT file, add the line right after the PATH statement.

NOTE:

* Some versions of PC DOS (i.e. 3.x, 4.x) also use the EDIT command. If one does not work, use the other.

Search Keywords

Hint Category

DOS/Windows 3.x, Video

Date Created

21-03-97

Last Updated

25-01-99

Revision Date

08-06-99

Brand

IBM Aptiva

Product Family

Aptiva, PS/1

Machine Type

2011, 2121, 2123, 2133, 2144, 2155, 2168

Model

C01; C34; M01; NEA; T35; U35; A62; A82; A94; B82; C42; C92; G42; M82; S92; 081; 087; 131; 137; K37; N31; N81; 11E; 13T; 14C; 16E; 17A; 18A; 18T; 19C; 21C; 23C; 28A; 46M; 51D; D50; G11; G13; G43; G46; G46; G49; G49; G50; G53; M40; M40; M46; M46; P11; P13; P43; P50; P53; R04; R05; R06; R09; R38; R42; R43; R44; R84; R86; R87; RO3; S11; S13; S43; S45; S45; S47; S47; S48; S48; S50; S53; W11; W13; W42; W42; W43; W45; W45; W50; W53; 20E; 22T; 24C; 24M; 28V; 39E; 41T; 43C; 45V; 48E; 50T; 52C; 55V; 72E; 74T; 76C; 78C; 79C; 81A; 82E; 84T; 86C; 87C; CC1; D53; G14; G44; G52; G54; G72; G76; G78; G82; NM1; P14; P44; P57; P71; P74; P76; P78; P84; R14; R15; R16; R17; R18; R51; R52; R57; R58; R62; R63; R67; R71; R89; R93; R96; R97; S14; S44; S50; S54; S70; S75; S76; S78; S80; W14; W44; W48; W54; W67; W76; W77; W78; Z33; 28V; 31E; 33T; 37C; 38C; 51E; 54T; 56C; 57C; 88V; BB1; G57; G87; OR1; OR3; OR4; OR5; P89; R28; R29; R31; R74; R78; R82; R98; S55; S85; SR1; US1; W52; W82; 5R5; M91; 2R5; 2R7; 2R8; M30; M35; M50; 2R6; 4R7; 4R8; M40; M54; M58; 3R0; 3R8; M60; M70; 1R2; 66P; 67P; 86P; OR8; 1R1; 1R3; 1R5; 22P; 24P; 25P; 27P; 29P; 63P; 67P; 82P; 83P; OR6; OR7; OR9; 1R0; 1R1; 26P; 62P; 2R0; P30; 2R3; S15

TypeModel

Retain Tip (if applicable)

Reverse Doclinks
and Admin Purposes