Command Prompt Default Text Color

  1. Feuer's Avatar
    Posts : 315
    Windows 10 Home Single Language 21H1
       #1

    Command Prompt Default Text Color


    Hi,

    Code:
    REG ADD "HKCU\Software\Microsoft\Command Processor" /v "DefaultColor" /t REG_DWORD /d "10" /f

    I use this tweak to use command prompt text color as "light green".

    It works with;
    1. When i open command prompt from WIN+R; cmd
    2. Command prompt from WinX menu (normal start and administrator start).

    But when i use a batch file (.bat) I get white text color.
    I want to see light green text color when bat and cmd files are working too.
    Sure I can add a "color" command at the begining of the batch file but I want to do it from registry if it is possible.

    Thanks.

    screenshots;
    Command Prompt Default Text Color-ss_20210925_14162910.pngCommand Prompt Default Text Color-ss_20210925_14164434.png
      My Computer

  2. Paul Black's Avatar
    Posts : 14,671
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #2

    Hello @Feuer,

    You need to add the color within the Batch Script. Put this in a Batch Script and run it . . .

    Code:
    
    @echo off
    color A
    echo. & echo  Hello World!
    echo. & pause

    A = Light Green

    Also, have a look at this => NT's COLOR Command

    I hope this helps.
      My Computer

  3. Feuer's Avatar
    Posts : 315
    Windows 10 Home Single Language 21H1
    Thread Starter
       #3

    @Paul Black
    Thanks for your reply

    I use "color" commad in some of my batch files but i have hundreds of BAT files, it could be hard to edit them all for this.
    I want to set a default color for CMD and BAT consoles via registry.

    Beside it, i found the registry address to do it in BAT files too.


    HTML Code:
    REG ADD "HKCU\Console" /v "ScreenColors" /t REG_DWORD /d "10" /f
    I hope this helps others who are interested.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 05:11.
Find Us




Windows 10 Forums