How to change the prompt.

F

Frank Rizzo

Back in the DOS days, you could change the look of the command prompt by
issuing the PROMPT $P$_$G like commands in the autoexec.bat.

How can I permanently change the prompt in Windows XP?

Thanks.
 
W

Wesley Vogel

Type prompt /? in a command prompt window and hit Enter.

Prompt HELP
Paste the following line into Start | Run and click OK...

hh ntcmds.chm::/prompt.htm

[[This setting allows you to change the format of the command prompt to show
additional information instead of just the current drive and path ("C:\>").
To do so, go to Start/Run/Regedit and navigate to this key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment. In the right pane, double click the REG_EXPAND_SZ
string named PROMPT and modify the Value data accordingly:

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 alternatives 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 for the change to take effect. ]]]
from...
http://www.kellys-korner-xp.com/xp_c.htm

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
F

Frank Rizzo

Bob said:
You need to pass the info to CMD Please look up CMD in Help and Support.

No, no. What I want is that when go to Start/Run and type "cmd", my
customized prompt should already be there, without passing any info to it.

Thanks.
 
B

Bob I

Check the reply from Wesley then.

Frank said:
No, no. What I want is that when go to Start/Run and type "cmd", my
customized prompt should already be there, without passing any info to it.

Thanks.
 
F

Frank Rizzo

Thanks, that's exactly what I needed. One correction. The Prompt key
doesn't exist in that registry branch, so you have to create it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top