The format of the command prompt displays the current drive and path ("C:\>"). Variables and special codes can also be used to more meaningful command prompt.
For this, go to Start > Run menu, enter “regedit” and navigate to the registry path listed below. If the subkey “\CurrentControlSet\Control\Session Manager\Environment” is not present, create it as explained below. Then, create an expandable string value name “Prompt”, if this value does not exist. Now, right-click and modify the value data box with any of the following characters to enable the setting:
| You can easily configure command prompt by using any of the following characters: |
| Shown | Command |
| Current drive | $N |
| Current drive and path | $P |
| Current date | $D |
| Current time | $T |
| Windows version number | $V |
|
| The following are commands that will display single char: |
| Shown | Command |
| '>' | $G |
| '<' | $L |
| '(' | $C |
| ')' | $F |
| (space) | $S |
| (Causes a CR/LF; new line) | $_ |
Click “OK” and close the registry editor. For default, just delete this entry.
After logoff or system restart, changes take effect.