なんか最近のWindows 10ってPowerShellゴリ押しでキツイですよね…
Windowsアイコン右クリックのコマンドプロンプトを開くオプションは設定から変更可能ですが
エクスプローラーで従来通りcmdで開いて欲しいことが多いのでそのレジストリファイルを公開してみます
「PowerShellウィンドウをここで開く」を「コマンド ウィンドウをここで開く」に置き換える
これを文字コードはANSIで保存してください
UTF-8だと「コマンド ウィンドウをここで開く(管理者)」が文字化けする
内容を確認するとわかるけどPowerShellで開くオプションを無効化するので必要ならそこだけ消してください
ちなみにこんなことしなくてもエクスプローラーのアドレス欄にcmdって打てばそこで開きます
レジストリの編集は一定の危険性を伴います。
このファイルの読み込みで直ちに障害を引き起こすことは考えにくいですが、自分が何をしているかを理解して実行してください。
open-cmd-here.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell]
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\cmd]
"HideBasedOnVelocityId"=dword:00000000
"ShowBasedOnVelocityId"=dword:00639bc8
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\runas]
@="コマンド ウィンドウをここで開く(管理者)(&A)"
"Extended"=""
"NoWorkingDirectory"=""
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=dword:00000000
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Powershell]
"HideBasedOnVelocityId"=dword:00639bc8
"ShowBasedOnVelocityId"=dword:00000000
[HKEY_CURRENT_USER\Software\Classes\Drive]
[HKEY_CURRENT_USER\Software\Classes\Drive\shell]
[HKEY_CURRENT_USER\Software\Classes\Drive\shell\cmd]
"HideBasedOnVelocityId"=dword:00000000
"ShowBasedOnVelocityId"=dword:00639bc8
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CURRENT_USER\Software\Classes\Drive\shell\Powershell]
"HideBasedOnVelocityId"=dword:00639bc8
"ShowBasedOnVelocityId"=dword:00000000
[HKEY_CURRENT_USER\Software\Classes\Drive\shell\runas]
@="コマンド ウィンドウをここで開く(管理者)(&A)"
"Extended"=""
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=dword:00000000
[HKEY_CURRENT_USER\Software\Classes\Drive\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CURRENT_USER\Software\Classes\Folder]
[HKEY_CURRENT_USER\Software\Classes\Folder\shell]
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\cmd]
@="@shell32.dll,-8506"
"HideBasedOnVelocityId"=dword:00000000
"ShowBasedOnVelocityId"=dword:00639bc8
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\Powershell]
"HideBasedOnVelocityId"=dword:00639bc8
"ShowBasedOnVelocityId"=dword:00000000
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\runas]
@="コマンド ウィンドウをここで開く(管理者)(&A)"
"Extended"=""
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=dword:00000000
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""
「PowerShellウィンドウをここで開く」を復元する
この変更を戻すには以下のファイルを適用してください
revert-open-cmd-here.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\cmd]
"ShowBasedOnVelocityId"=dword:00000000
"HideBasedOnVelocityId"=dword:00639bc8
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\runas]
"ShowBasedOnVelocityId"=dword:00000000
"HideBasedOnVelocityId"=dword:00639bc8
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Powershell]
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=dword:00000000
[HKEY_CURRENT_USER\Software\Classes\Drive\shell\cmd]
"ShowBasedOnVelocityId"=dword:00000000
"HideBasedOnVelocityId"=dword:00639bc8
[HKEY_CURRENT_USER\Software\Classes\Drive\shell\runas]
"ShowBasedOnVelocityId"=dword:00000000
"HideBasedOnVelocityId"=dword:00639bc8
[HKEY_CURRENT_USER\Software\Classes\Drive\shell\Powershell]
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=dword:00000000
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\cmd]
"ShowBasedOnVelocityId"=dword:00000000
"HideBasedOnVelocityId"=dword:00639bc8
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\runas]
"ShowBasedOnVelocityId"=dword:00000000
"HideBasedOnVelocityId"=dword:00639bc8
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\Powershell]
"ShowBasedOnVelocityId"=dword:00639bc8
"HideBasedOnVelocityId"=dword:00000000