Command Prompt Color - Registry setting doesn't work for this combo.


  1. Posts : 426
    Win7 Ultimate SP1
       #1

    Command Prompt Color - Registry setting doesn't work for this combo.


    Here's an anomaly.

    In my W7 Ultimate Administrator Command Prompt, I'm trying to set the colors as follows:
    Screen Background: 192, 192, 192
    Screen Text: 0, 0, 255

    You can see the selection area by right-clicking the Title Bar (or the little black box at top left) and clicking Properties or Defaults.

    My preference (RGB numbers above) is a light gray background with bright blue text.

    Problem is, the background won't stay set. It keeps reverting to a murky green, 128, 128, 0.

    No problem, says I. The colors can be set in the registry. But can they?

    Here's the rub. Under the key HKEY_CURRENT_USER/Software/Microsoft/Command Processor, the Set DefaultColor command only works for a 2-character combination of 0 to 9 plus A to F. You can see the same thing working in the Command Prompt box itself. If you type 'color' followed by say, f0, you'll get black text on a white background. color 0f will get you white text on black. And so on.

    Now, if you Google for 'command prompt colors' you'll get umpteen pages like this one that show the colors represented by the 16 characters:

    https://technet.microsoft.com/en-us/.../bb490882.aspx

    Have a look for 'gray' in any of those charts and you'll find it's represented by the numeral 8.

    But go back to the palette in the Command Box and you'll see that there are TWO grays. And the gray that 8 gets is a DARK gray, not the LIGHT gray beside it on the palette.

    So if I type color 89 in the box, I get blue text on a DARK gray background, not the blue on light gray that I can get from the palette.

    Do you see my dilemma? Neither the Defaults or Properties selections in the command box will remember my settings. But I can't set my colors as defaults in the registry because there's no number that represents the light gray that I want.

    Anyone have an answer for this?

    Thanks for reading.
      My Computer


  2. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #2

    Hi Teckneeculler,

    Instead of changing colour defaults globally, I suggest you create a shortcut to Cmd.exe on your desktop, then make your desired colour changes in the Colours tab of the shortcut's Properties pane.

    Avoid making changes under "HKCU\Software\Microsoft\Command Processor". All command prompt sessions will always be overridden with these preferences. That means if you change the value of DefaultColor you'll be stuck with the colour profile on all command prompt instances until you revisit the registry and reset its value back to 0.

    To automatically reset the global defaults you've changed, I've attached a registration file you should merge.
    Command Prompt Color - Registry setting doesn't work for this combo. Attached Files
    Last edited by Pyprohly; 31 Dec 2015 at 06:41.
      My Computer


  3. Posts : 426
    Win7 Ultimate SP1
    Thread Starter
       #3

    Thanks Pyprohly. Actually, I haven't changed any settings in the Registry yet, I was just pointing out that there's no color code (f0, 0f, AE, 12, etc) that covers my light gray.

    So do I need to run your reg file?

    Re the shortcut to cmd.exe, what are the changes to the properties of the shortcut?

    Cheers
      My Computer


  4. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #4

    teckneeculler said:
    Thanks Pyprohly. Actually, I haven't changed any settings in the Registry yet, I was just pointing out that there's no color code (f0, 0f, AE, 12, etc) that covers my light gray.

    So do I need to run your reg file?
    Sure, just to satisfy my effort.

    teckneeculler said:
    Re the shortcut to cmd.exe, what are the changes to the properties of the shortcut?
    The Properties pane. The bottom option of the context menu when selecting an item.

    In the Properties pane of a Cmd.exe shortcut you should see a 'Colors' tab.
      My Computer


  5. Posts : 426
    Win7 Ultimate SP1
    Thread Starter
       #5

    To say that I'm gobsmacked, would be something of an understatement. So I'll just say THANK YOU for that very effective information. Much appreciated

    Later: Interesting. Now I've created the shortcut to CMD.EXE and modified its properties accordingly, every Command Prompt box opens with my preferred settings. Like, even if I open a CMD box from Start > Programs > Accessories the box still opens with my preferred colors! Not complaining, you understand. Just saying
    Last edited by teckneeculler; 29 Dec 2015 at 22:57.
      My Computer


 

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

© Designer Media Ltd
All times are GMT -5. The time now is 23:03.
Find Us