答え1
文字列値「extended」が名前変更または削除されて「shift」要件が満たされていることを確認します。
もう1つは、「NoWorkingDirectory」という文字列値を追加することです。これにより、フォルダがクリックされていない場合でも両方が表示されるようになります。
答え2
PowerShell のソリューション:
- 「Win + R」を押して、regedit を実行してレジストリ エディターを開きます。
それぞれの場所へ移動します:
HKEY_CLASSES_ROOT\Directory\shell\Powershell HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell HKEY_CLASSES_ROOT\Drive\shell\Powershell
各キーについて、左パネルでキーを右クリックし、「アクセス許可...」、「詳細設定」の順に選択し、所有者を「管理者」に変更してから、「管理者」に「フル コントロール」 - 「許可」を割り当てます。「OK」を押します。
- 各キーについて、右側のパネルの「Extended」キーを削除します。
答え3
Windows Registry Editor Version 5.00
; Add_enhanced_cmd_and_powershell_to_menu.reg ; これにより、コマンドとPowershellのサブメニューオプションが追加されます
[HKEY_CLASSES_ROOT\Directory\Background\shell\01MenuCmd] "ExtendedSubCommandsKey"="Directory\ContextMenus\MenuCmd" "Icon"="cmd.exe" "MUIVerb"="コマンド プロンプト"
[HKEY_CLASSES_ROOT\Directory\Background\shell\02MenuPowerShell] "ExtendedSubCommandsKey"="Directory\ContextMenus\MenuPowerShell" "Icon"="powershell.exe" "MUIVerb"="PowerShell プロンプト"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\open] "Icon"="cmd.exe" "MUIVerb"="コマンドプロンプト"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\open\command] @="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\runas] "HasLUAShield"="" "Icon"="cmd.exe" "MUIVerb"="コマンド プロンプト (管理者特権)"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\runas\command] @="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\open] "Icon"="powershell.exe" "MUIVerb"="PowerShell"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\open\command] @="powershell.exe -noexit -command Set-Location '%V'"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\runas] "HasLUAShield"="" "Icon"="powershell.exe" "MUIVerb"="PowerShell 昇格"
[HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuPowerShell\shell\runas\command] @="powershell.exe -noexit -command Set-Location '%V'"
[HKEY_CLASSES_ROOT\Directory\shell\01MenuCmd] "ExtendedSubCommandsKey"="Directory\ContextMenus\MenuCmd" "Icon"="cmd.exe" "MUIVerb"="コマンド プロンプト"
[HKEY_CLASSES_ROOT\Directory\shell\02MenuPowerShell] "ExtendedSubCommandsKey"="Directory\ContextMenus\MenuPowerShell" "Icon"="powershell.exe" "MUIVerb"="PowerShell プロンプト"
答え4
PS および CMD コンテキスト項目を追加するための完全に自動化されたソリューションを作成しました。set_registry.cmd を実行するだけで、フォルダー上または開いているフォルダー内で右クリックしたときにレジストリが更新され、2 つのボタンが追加されます。
これにより、レジストリキーの所有者が管理者に変更され、コンテキストメニューが追加されます。
レジストリを変更して PS および CWD コンテキスト メニューを有効にする