Steps
Decide whether you want to:
- Change look/feel for a single cmd prompt/batch file,
- Change properties for all command prompts (default behavior).
Get ready to change some Windows settings Change the Look & Feel Select or Create the shortcut/batch file for which you wish to change properties. If you select an existing batch file (*.bat), type a single command ("pause") into a new first line. For extra security (maybe there's commands in there you DON'T want to run), REM out the rest of the contents (put REM <space> at the start of each line). If you create an empty batch file (*.bat), type a single command ("pause") in it. When you run the batch file, it doesn't just exit immediately, allowing you to change it's settings. you could also go to notepad, type "command.com" and save it as cmd.bat
- Run the Command Prompt/batch file
- Click on the Command Prompt's system button (that's the little icon showing "C:\" at the top-left of the window, right opposite the window's "X" closure button). You get a command menu.
- To change settings for this Command Prompt window only, open <properties> on the command menu, you can change lots of look/feel settings.
- To change default settings for all Command Prompt windows, open <defaults> on the command menu, you can change lots of look/feel settings.
Change the Prompt
- When you start a Command Box in Windows, it will display a prompt where you can enter the command to be executed.
However, you can easily configure this prompt:
- Open a Command Prompt to test your new Prompt.
- Copy this new prompt below and paste it in (right-click <paste>):prompt $_Hello Chaps$_$t$_$d$_$_[%computername%] $p$g
- Press <Enter>.
- See the new prompt that gives you!
- Modify the string to make the text more "yours". Test the modified prompt.
- When happy, prepare to modify your computer settings. This will change default Prompt behavior.
Set your Prompt as default
- These settings require a registry change.
- Run your registry editor (click <Start><Run> and type "regedt32.exe".
- Navigate to the following key:→ HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Prompt
- Change the <Prompt> key to the following (or use your own string).prompt $_[%computername%]$_$t$_$d$_$_$p$g
- Restart your computer to complete registering of your new prompt.
- To reset your prompt to windows default, clear the above key of all data.
Tips
The prompt by default is "$P$G" which simply means "Display the current drive and path" ($P) followed by a ">" sign ($G), for example ("C:\Windows>").
- $N Current drive
- $P Current drive and path
- $T Current time (HH:MM:SS.mm)
- $D Current date
- $V Windows version number
- $H Deletes the previous character
- $G >
- $L <
- $C (
- $F )
- $S (space)
- $_ (Causes a CR/LF; new line)
- [%computername%] Your Computer Name in between brackets
- %name_of_environment_varible% displays the value of the environment variable
Article provided by wikiHow, a wiki how-to manual. Please edit this article and find author credits at the original wikiHow article on How to Create a Custom Windows Command Prompt. All content on wikiHow can be shared under a Creative Commons license.