드라이브, 폴더 및 현재 디렉터리에 대한 마우스 오른쪽 버튼 클릭 메뉴에 "PowerShell Here" 및 "Command Window Here"를 추가합니다.

드라이브, 폴더 및 현재 디렉터리에 대한 마우스 오른쪽 버튼 클릭 메뉴에 "PowerShell Here" 및 "Command Window Here"를 추가합니다.

예를 들어 .reg 파일을 적용하고 편집해 보았습니다.여기그리고여기

그러나 Shift 키를 누르지 않으면 모든 마우스 오른쪽 버튼 클릭 메뉴에서 "PowerShell Here" 및 "Command Window" 옵션을 얻을 수 없는 것 같습니다.

단일 .reg 파일을 사용하여 모든 마우스 오른쪽 버튼 클릭 메뉴(예: 드라이브, 폴더 및 폴더 내의 공백)에 이러한 항목을 추가할 수 있는 방법이 있습니까?

이 질문은 다른 형태입니다이 하나

즉, 현재 열려 있는 폴더의 공백을 마우스 오른쪽 버튼으로 클릭하는 것도 포함됩니다(폴더나 드라이브를 직접 클릭하는 것이 아닙니다).

답변1

문자열 값 "extended"가 'shift' 요구 사항을 변경하기 위해 이름이 바뀌거나 제거되었는지 확인하세요.

다른 한 가지는 "NoWorkingDirectory"라는 문자열 값을 추가하면 폴더를 클릭하지 않은 경우에도 둘 다 표시될 수 있습니다.

답변2

PowerShell용 솔루션:

  1. “Win + R”, regedit를 실행하여 레지스트리 편집기를 엽니다.
  2. 각각 다음 위치로 이동하세요.

    HKEY_CLASSES_ROOT\Directory\shell\Powershell HKEY_CLASSES_ROOT\Directory\Background\shell\Powershell HKEY_CLASSES_ROOT\Drive\shell\Powershell

각 키에 대해 왼쪽 패널의 "권한...", "고급" 키를 마우스 오른쪽 버튼으로 클릭하고 소유자를 "관리자"로 변경한 다음 "모든 권한" - "허용"을 "관리자"에 할당합니다. “확인”을 누르세요.

  1. 각 키에 대해 오른쪽 패널의 "확장" 키를 삭제하세요.

원천

답변3

Windows Registry Editor Version 5.00

; Add_enhanced_cmd_and_powershell_to_menu.reg ; 그러면 Command 및 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를 실행하면 폴더나 열린 폴더 내부에서 RMB를 클릭할 때 두 개의 버튼을 추가하도록 레지스트리가 업데이트됩니다.

이렇게 하면 레지스트리 키 소유자가 관리자로 변경되고 상황에 맞는 메뉴가 추가됩니다.
PS 및 CWD 상황에 맞는 메뉴를 활성화하려면 레지스트리를 변경하세요.

관련 정보