2

I noticed something unexpected with my command prompts on Windows 8.1 (and Windows 7). I was hoping someone could clarify this.

I installed cmd-colors-solarized on my machine so my command prompt would use the Solarized color scheme. The script works by adding color identifiers into the registry, namely in [HKEY_CURRENT_USER\Console].

  • When I open the command prompt through the start menu (Press the Windows Key and start typing cmd) I get the command prompt with the Solarized color scheme. This works both for the regular user as the administrator.
  • When I open the command prompt through the power user menu (Windows Key + X) I get get the default size and color scheme.
  • When I open the Visual Studio Command Prompt (which actually calls the following: %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"") I get the default size and color scheme.

I assumed that the same settings would be used when opening command prompts in different ways, but this does not seem to be the case. I looked around the registry but I was unable to find any other possible locations were the last two command prompts would get their info from.

Has anyone any idea why all the command prompts look and behave differently?

edit: I have been messing with the registry so much I can't get the Solarized theme to work anymore. But I have made some progress on why this occurs. I can see the Solarized colors when I choose to edit the command prompt defaults, not when I try to edit the properties. The post Temporarily Changing Console Properties in Windows 7 contains the answer to why, now I would like to know how I can fix this.

Jensen
  • 133
  • 5
  • Are you sure you're picking "Command Prompt" and not "Command Prompt(Admin)" from the power menu? When you open the command prompt from the power menu is it dropping you into your user folder, or System32? – Ƭᴇcʜιᴇ007 Sep 12 '14 at 19:10
  • Both give the same result. As mentioned, running the "regular" command prompt as Administrator also uses the Solarized theme, so I know it's not related to that. The "regular" one is dropping me in the user folder, the "admin" one in System32. – Jensen Sep 12 '14 at 19:11
  • Hmm, weird. Good question. ;) – Ƭᴇcʜιᴇ007 Sep 12 '14 at 19:33

1 Answers1

3

If you start console application thru LNK file then settings come from that LNK (if present) and saved to it. Win+X LNKs located here %LocalAppData%\Microsoft\Windows\WinX and "Visual Studio Command Prompt" is also LNK, so settings come not from registry. If you start console application by EXE file then the settings come and saved to HKEY_CURRENT_USER\Console subkey based on EXE full path.

user364455
  • 2,979
  • 2
  • 13
  • 15
  • So the only way to modify the colors accordingly would be to edit the individual colors on the terminal, not through the registry? – Jensen Sep 13 '14 at 16:32
  • @Jensen If LNK file does not have color information, then defaults from registry are used. So you can remove and recreate LNKs to clear color information and defaults will be used. – user364455 Sep 13 '14 at 21:49