microsoft/Terminal

Let Terminal auto-detect a busted `AutoRun` value for CMD

オープン

#15,658 opened on 2023/07/05

 (2 件のコメント) (0 件のリアクション) (0 人の担当者)C++ (9,275 件のフォーク)batch import
Area-TerminalConnectionArea-UserInterfaceHelp WantedIssue-TaskProduct-Terminal

Repository metrics

Stars
 (103,173 個のスター)
PR merge metrics
 (平均マージ 27d 19h) (30d で 24 merged PRs)

説明

CMD has this magic AutoRun reg key that's a gigantic footgun.

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
  • HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

Basically, if someone writes a bad value to that, it can mess up CMD.exe real bad. As a real life example: https://github.com/conda/constructor/pull/521

We attempted to patch this in Windows 11. But we'll surely be unable to backport that. While we're maintaining Windows 10 support, it might be nice to return a specific warning for this in Terminal. Something like:

if (profileGuid == {cmd} && error == 1 && reg query ....) { write("Hey your AutoRun value might be busted. Go check these reg keys:"); }

(for discussion. We can always just say meh, since we did fix this for cmd.exe)

コントリビューターガイド