Set default prompt

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
findstr
Posts: 17
Joined: 09 Jun 2021 12:36

Set default prompt

#1 Post by findstr » 11 Jun 2021 09:19

Hello!

Code: Select all

PROMPT $E[48^;5^;104^;38^;5^;15m$D$G$E[0m$S
How can I make cmd.exe to run this code at startup to set the color prompt automatically every time I launch cmd.exe?
Windows 10
Thanks!

T3RRY
Posts: 249
Joined: 06 May 2020 10:14

Re: Set default prompt

#2 Post by T3RRY » 11 Jun 2021 09:55

findstr wrote:
11 Jun 2021 09:19
Hello!

Code: Select all

PROMPT $E[48^;5^;104^;38^;5^;15m$D$G$E[0m$S
How can I make cmd.exe to run this code at startup to set the color prompt automatically every time I launch cmd.exe?
Windows 10
Thanks!
Assuming you have either A) Cmd.exe pinned to the task bar or B) you use a shortcut to open cmd, you can edit the properties of the shortcut and change the target to:

Code: Select all

%windir%\system32\cmd.exe -cmd /k "PROMPT $E[48^;5^;104^;38^;5^;15m$D$G$E[0m$S"
Otherwise, you'll need to create a batch file containing the command and modify a Registry value. See: https://stackoverflow.com/a/17405182/12343998

Post Reply