A colored prompt for a DOS window in Windows NT

Insert in the following file '%systemroot%\system32\config.nt'...

the following line:

device=%systemroot%\system32\ansi.sys

create a shortcut on the desktop of command.com and from the command prompt run the following command:

set prompt=$e[42m $e[47m $e[41m $e[40m $e[1;37m$p$g$e[0m

the result will be the following:



is possible by running the command shown to occur the following error: Out of Environment Space. To resolve the situation just add in the properties of the shortcut, into the section "Program->Cmd line", the parameter "/e:4096" as shown in the following:



The following tables show the codes for the text format, the format of the text color and size of the background color:

Text format
1 bold
4 underscore
5 intermittent
8 hidden

Foreground color
30 black  
31 red  
32 green  
33 yellow  
34 blue  
35 magenta  
36 aqua  
37 white  
7 black / white OK

Background color
40 black  
41 red  
42 green  
43 yellow  
44 blue  
45 magenta  
46 aqua  
47 white  
7 black / white OK