让win10菜单栏新增打开cmd,windows powershell的功能

以下代码保存为.reg文件,双击运行导入注册表后即可出现

 

Windows Registry Editor Version 5.00

; 删除之前添加的 Windows Terminal 菜单(如果存在)
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\OpenWindowsTerminalHere]

; 在文件夹空白处添加 PowerShell
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\OpenPowerShellHere]
@="在此处打开 PowerShell"
"Icon"="powershell.exe"

[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\OpenPowerShellHere\command]
@="powershell.exe -NoExit -Command \"Set-Location -LiteralPath '%V'\""

; 在文件夹空白处添加 CMD
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\OpenCmdHere]
@="在此处打开 CMD"
"Icon"="cmd.exe"

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

posted @ 2026-11-10 15:18  LoveCoder  阅读(4)  评论(0)    收藏  举报