Command/DOS prompt Customizations
Change the Command Prompt Colors
Find this key
[HKEY_CURRENT_USERSoftwareMicrosoftCommand Processor]
and edit or add the DWORD value Default Color.
You can replace this value with a two-digit hexadecimal number, in which the
first digit selects a background color and the second a foreground color. The
hexadecimal codes are as follows:
Hexadecimal value Color
0 Black
1 Blue
2 Green
3 Aqua
4 Red
5 Purple
6 Yellow
7 White
8 Gray
9 Light Blue
A Light Green
B Light Aqua
C Light Red
D Light Purple
E Light Yellow
F Bright White
A value of F0, for example, would give black text on a white background, and 1E
would yield yellow text on a blue background.
Format the command prompt
To format the command prompt find this key in the registry
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetContro lSession Manager
Environment]
And create or modify a string value called PROMPT, and insert any of the
following codes or variables in any order as a value.
Special Codes
$A - & (Ampersand)
$B - | (pipe)
$C - ( (Left parenthesis)
$D - Current date
$E - Escape code (ASCII code 27)
$F - ) (Right parenthesis)
$G - > (greater-than sign)
$H - Backspace (erases previous character)
$L - < (less-than sign)
$N - Current drive
$P - Current drive and path
$Q - = (equal sign)
$S - (space)
$T - Current time
$V - Windows XP version number
$_ - Carriage return and linefeed
$$ - $ (dollar sign)
Variables
%USERNAME% - Current Username
%COMPUTERNAME% - Local computer name
%USERDOMAIN% - Local domain name
The default prompt is "$P$G" (e.g. "C:>"), some examples include:
[%computername%]$S$P$G to show the computer, drive and path
[%username%]$S$P$G to show the current user, drive and path
Restart or log-off Windows will be required for the change to take effect.