#1] Where exactly are those settings stored in Windows 10?
I am just tired of setting them every time I install [from scratch] a new version of operating system. So maybe there are some config files that could be just copied / replaced? Or some Registry entries that could be exported to REG file, like in the case of Notepad; i.e. with a BAT file like
Code: Select all
reg export "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Notepad" "C:\Users\YOUR-USER-NAME\Documents\Notepad settings.reg"
#2] What's up with all those versions of cmd.exe?
I [vaguely] know why there is
C:\Windows\system32\cmd.exe
and also
C:\Windows\SysWOW64\cmd.exe
And because of that [for my own convenience] I made LNK files leading to them- plus [for further convenience] I also added to my freeware file manager FreeCommander some toolbar icon / shortcuts. And so I am able to execute CMD either from those LNK files or from toolbar icons - in either a normal mode or with Administrator privileges
But here comes the Matrix part: all in all, I am able to store seven [7!] different GUI settings, each showing itself according to a link / method chosen for running a cmd.exe file - but the Task Manager of operating system is always showing me that it is using always the same
C:\Windows\SysWOW64\cmd.exe
version. So how is it possible to have 7 configs for 2 executable files? [With PowerShell the Matrix stuff that is happening is similar, but as I have not dug in it thoroughly enough, I am unable to conclude that it is exactly the same]
#3] I have also noticed that every BAT file that I have after executing it simply ignores all of those color GUI settings that I made for those [7] various versions of Command Prompt
Trying to get to the root of this I have noticed [with the help of HIPS feature of the free COMODO] that when I execute any BAT file, it asks for access to
C:\Windows\System32\conhost.exe
And so I went to its location to run it. But as this file is invisible in FreeCommander as well as in Window Explorer [even when hidden files are set to be shown], I had to past in that path in the Address Bar of Window Explorer in order to execute that file. [Pasting that path in FreeCommander does not work. But that Matrix-like file can also be accessed with a help of 7-zip, which program does not see it but opens that path raveling
C:\Windows\System32\conhost.exe\.rsrc\version.txt
and also other files]
When conhost.exe is executed from a path, it opens yet another version of CMD. So one could think that this is it, that this is this location where default settings of Command Prompt are stored. And that by changing Properties of that one window all of the BAT files would be affected. Unfortunately as my test has shown, nothing changes - i.e. when I run this conhost.exe I get in it what I want [like changed colors], but when I run BAT files I still see a default scheme [of white on black]. And so in order to make my every BAT file color / font adjusted I would have to either manually add some script lines in them concerning their looks - or run them and then also manually adjust Properties in those regards. But then again the Matrix reveals itself. Because not only can I can adjust visuals for every of my BAT files by changing Properties for every single Command Prompt window that pops up - I can also override these Properties by running those BAT files via LNK shortcuts created for them [which I use on a daily basis as method of elevating some of my BATs to the Administrator level]
So coming back to questions:
A] How many different version of cmd.exe there really are in Windows 10?
B] Where are all these multiple settings stored. And can there be successfully exported and then imported on another machine?
C] Is PowerShell in regards to color settings handled also in the same way as Command Prompt?
[Currently I am using Windows 10 Enterprise 20H2 19042.746 x64]