LoginSignup
8

More than 1 year has passed since last update.

posted at

updated at

Windows10で『コマンドウィンドウをここで開く』を復活する

Windows10のエクスプローラー上で、任意のフォルダーを Shift+右クリック したときに、コマンドウィンドウをここで開く メニューを表示させる方法です。
※ver.1803(April 2018 Update) , ver.1903(May 2019 Update) および ver.1909(Nov 2019 Update)で動作することを確認しています。

※ (2019/08/29追記) 何かの拍子(Windows Updateしたとき?)にレジストリ設定が一部消えてしまい、メニューが出なくなってしまいましたが、再度レジストリ設定を行うことで無事復活しました。

やることはレジストリに以下のキーを書き込むだけです。 ★レジストリ書き込みは自己責任で★

.regファイルはちょっと特殊な(?)Encoding(UTF-16 with BOM / CRLF)なので、regeditで適当なキーをエクスポートし、そのファイルをVSCodeなどのちゃんとしたエディターで開き、以下を上書きするのが安全です。

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\cmd]
@="@shell32.dll,-8506"
"Extended"=""
"ShowBasedOnVelocityId"=dword:00639bc8
"NoWorkingDirectory"=""
"HideBasedOnVelocityId"=dword:0

[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CURRENT_USER\Software\Classes\Directory\shell\cmd]
@="@shell32.dll,-8506"
"Extended"=""
"ShowBasedOnVelocityId"=dword:00639bc8
"NoWorkingDirectory"=""
"HideBasedOnVelocityId"=dword:0

[HKEY_CURRENT_USER\Software\Classes\Directory\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""

ShowBasedOnVelocityId/HideBasedOnVelocityId の値だけを書き込めばいいと書かれているサイトもありましたが、私の環境では必要な項目を全部書き込まないとダメでした。


参考

[Shift]+右クリックメニューに「コマンドウィンドウをここで開く」を復活させる方法:Tech TIPS - @IT
Windows10/Shift+右クリックで「コマンドウィンドウをここで開く」を復活させる - IMUZA.com

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
8