Jump to content

Restoring command prompt defaults?


NOTS3W

Recommended Posts

I was playing around with colors and other settings on the command prompt in Windows 7 (although I think it's the same for other versions of Windows) and want to restore the default colors, etc. If you right click on the title bar of the command prompt window, you can see the defaults but nowhere does it make it obvious how to restore them. I can't find any registry entries that are that obvious, either. Short of copying each setting individually from Defaults to Properties, is there a way to just tell Windows to resume using the default values? If not, what good is the Defaults list?

Link to comment
Share on other sites


To restore the default white color:

Command_processor.reg


Windows Registry Editor Version 5.00

; White color

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"CompletionChar"=dword:00000009
"DefaultColor"=dword:00000000
"EnableExtensions"=dword:00000001
"PathCompletionChar"=dword:00000009

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]
"CompletionChar"=dword:00000040
"DefaultColor"=dword:00000000
"EnableExtensions"=dword:00000001
"PathCompletionChar"=dword:00000040

Other help:

http://www.msfn.org/.../page__st__1500 (post #1516)

Edited by myselfidem
Link to comment
Share on other sites

Yeah, I was making my registry changes in HKEY_CURRENT_USER\Console then I started playing with things in the command prompt properties and wanted to go back but while the values are set correctly in the registry, they are not reflected as such in the command prompt window itself. That is, if I manually change the command prompt to yellow on red, then run this reg file:

[HKEY_CURRENT_USER\Console]

"ColorTable13"=dword:00007fff

"CursorSize"=dword:0000000a

"FaceName"="Lucida Console"

"FontFamily"=dword:00000036

"FontSize"=dword:000e0000

"PopupColors"=dword:000000d0

"ScreenColors"=dword:0000000d

The command prompt should be orange on black and the registry reflects that but the command prompt still opens with yellow text on a red background. If I check Properties on the command prompt window, they're set to yellow on red. But if I check Defaults on that window, the right colors are there. I can't find a way to make the command prompt revert back to the default values.

Link to comment
Share on other sites

This is complicated and confusing but I think the solution is to create new shortcuts. Everything here is based on my own experimentation and may not be true on other systems.

New shortcuts get their settings from the current registry values. If you don't change the settings on the shortcuts, they'll reflect the current registry values even as the registry values are changed. Once you change the settings on a shortcut, it will retain those new settings forever and independently regardless of how the registry is changed. So each shortcut can have its own colors if set locally. There may (must?) be a value somewhere that determines if an individual shortcut uses the current registry settings or its own, but I don't know where that is.

If I run cmd from Search on the start orb, or if I run Windows\System32\cmd.exe, and change the settings, those new settings are used each time the program is run. Again, regardless of what's in the registry. Unlike the individual shortcuts with their independent settings, if I make changes to the Start Orb ~ Search ~ cmd.exe window, those same settings are used when I open Windows\System32\cmd.exe and vice versa.

So the ONLY time the registry settings are looked at is when a new shortcut is created or an existing unmodified shortcut is executed. Otherwise, cmd uses its last modified settings and each modified shortcut uses its own last settings.

I don't know how to get a modified command prompt shortcut to re-look at the registry for the current values. The only solution I've found is to discard those shortcuts and create new ones which will reflect the current registry settings.

I always thought a shortcut was just a pointer to a program and that it would therefore always execute a new copy of the target program each time it's run, and that the target program would always reflect the current registry settings. Obviously, that's not (always) the case.

Edited by NOTS3W
Link to comment
Share on other sites

Under the

HKEY_CURRENT_USER\Console

There are sub keys corresponding to the settings of each different ways you launched the console. If you just want to reset all the console with the default settings then removing the sub keys should solve the problem.

Edited by allen2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...