• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
NOTS3W

Restoring command prompt defaults?

6 posts in this topic

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?

0

Share this post


Link to post
Share on other sites

The settings are stored there (at least for older windows):

HKEY_CURRENT_USER\Console

0

Share this post


Link to post
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
0

Share this post


Link to post
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.

0

Share this post


Link to post
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
0

Share this post


Link to post
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
0

Share this post


Link to post
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.