3

In the times of Windows 7, I remember, there was [HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe] where all cmd.exe settings were stored. If I deleted this path, all cmd.exe would reset to defaults.

In Windows 10 if I delete [HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe], real user settings of cmd.exe won't reset to defaults. I guess there is another place where those settings are stored in registry. How could I find it?

3

I think you're looking for this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor 

Go to that registry key and delete all the values. Restart and the command prompt resets to default settings.

1
  • 1
    this path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor is not available anymore – lat94 Mar 18 '20 at 15:57
3

From my experiments (Windows 10 Version 1809)

  1. Defaults are stored in the registry at HKEY_CURRENT_USER\Console. These get applied whenever you make a new shortcut or open cmd.exe directly (typically from C:\Windows\System32), such as from the Run window (Windows Key + R).
  2. If you make any changes to the cmd window while opening it directly (not from a shortcut), these changed settings get saved in HKCU\Console\%SystemRoot%_system32_cmd.exe. These override the defaults in HKEY_CURRENT_USER\Console.
  3. Changed settings for shortcuts are saved within the .lnk file itself. This includes the entry in the start menu named Command Prompt, which points to the file %APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt.lnk. These override the defaults in HKEY_CURRENT_USER\Console.

3 seems to be the only difference from Windows 7, which stored shortcut settings in the registry under HKEY_CURRENT_USER\Console\<name_of_shortcut>

2

If you don't have the folder Command Processor on HKEY_CURRENT_USER\Software\Microsoft\ you can just create one with this script on PowerShell:

$regPath = 'HKCU:\Software\Microsoft\Command Processor'

if (! (test-path $regPath) ) {
   write-output "$regPath does not exist, creating"
   $eatMe = new-item -path $regPath
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.