Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


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

28 Dec 2015   #1
teckneeculler

XPPSP3, Win7Ultimate
 
 
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 System SpecsSystem Spec
.
28 Dec 2015   #2
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

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.


Attached Files
File Type: reg Command_Prompt_Defaults.reg (3.0 KB, 2 views)
My System SpecsSystem Spec
28 Dec 2015   #3
teckneeculler

XPPSP3, Win7Ultimate
 
 

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 System SpecsSystem Spec
.

28 Dec 2015   #4
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by teckneeculler View Post
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.

Quote   Quote: Originally Posted by teckneeculler View Post
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 System SpecsSystem Spec
28 Dec 2015   #5
teckneeculler

XPPSP3, Win7Ultimate
 
 

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 :-)
My System SpecsSystem Spec
Reply

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




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Command Prompt of the DVD and editing the system registry
Hi If I perform the boot from the DVD of Windows 7 Ultimate SP1 64 bit and then I open the Command Prompt, I can run a bat file containing some reg commands to edit the system registry of Windows 7 SP1? If not, how do I edit the system registry from the Windows 7 DVD? Thanks Bye
General Discussion
setting an environmental variable from command prompt
I live in the Linux world, so this might be a stupid question to Windows users. I need to set an environmental variable. I know I can do this through the control panel, but what a pain in the ass. If I open a command prompt and use the "set" command, the variable seems to last only as long as...
General Discussion
How to set color profile with command prompt?
Hello, having a good day? Hope so. Btw, this is my prefered color profile: http://img26.imageshack.us/img26/1876/32422902.jpg But everytime I finished playing games such as Crysis 2 or Just Cause 2 or Adobe the screen will be in over brightness so that I have to go to Control Panel > Color...
Performance & Maintenance
command prompt dosn't work
hello My command prompt somehow dosn't seem to work like i want it to. E.g. I want to enable the administrator account. So i type: net user administrator /active:yes Or i type ipconfig /all or getmac to get the mac address. No matter what command i type i get the message: 'something' is not...
General Discussion
How to export command prompt settings frm the registry?
Hello, I configured the command prompt window (size, colors, position) and now want to export this settings from the registry to save them in a reg file for later use on other computers. These setting do get saved somewhere in the registry but I don't remember where (did this on XP a couple of...
General Discussion
How does command prompt work?
any help, I have looked in the internet but the tutorials there are no good, HELP!
General Discussion


Our Sites

Site Links

About Us

Find 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 17:33.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App