0

For complicated reasons, I have been forced to make an identical copy of cmd.exe and rename it to cmd-2.exe, which I put a shortcut to in the Taskbar. The reason is purely to have them "grouped" in different "taskbar groups", and nothing else.

Sometimes, I forget about this, and to open a new cmd.exe, I simply middle-click that Taskbar icon to open a new cmd.exe. Then I type a command such as "dir", and then it spits out a bunch of nonsense, including:

DNS bad key.

This only happens if I accidentally use the cmd-2.exe. Not if I open the "real" cmd.exe. So it's not a "practical" problem.

However, I wonder why that message is ever printed at all. It's apparently failing to do some kind of DNS lookup or something? Why is DNS involved at all with me typing "dir" to list files in my local computer? I have no network set up, no "cloud drives", nothing like that whatsoever. It scares me that (apparently) there are DNS queries being made when I type "dir".

Or maybe "DNS bad key" refers to something completely unrelated to the Domain Name System? I don't know what a "bad key" would even be in that context...

1 Answers1

4

The error is not related to DNS, it is read wrong from the error DB file.

This happens because you second cmd-2.exe fails to locate and load the localized strings from the cmd.exe.mui resource library (its Error message DB).

The problem occurs starting from Windows Vista. All the text messages are compiled into a separate file (a .mui), so Windows would search for a message file with your new CMD name and will fail to find it.

To fix the problem: copy in the folder %WinDir%\System32\en-US (or your language) the file cmd.exe.mui to cmd-2.exe.mui .

Not doing that will result in strange unrelated messages.

Overmind
  • 10,308