右键菜单添加Open Powershell Here
问题描述
如何在 Windows 桌面右键或者在文件夹右键菜单中添加 Open Powershell Here 项目。想要实现该功能,需要
在注册表HKEY_CLASSES_ROOT\Directory\
中修改相关项。具体如下:
解决方法
打开注册表: Win+r,输入
regedit
找到
HKEY_CLASSES_ROOT\Directory\
- 文件夹中右键:
HKEY_CLASSES_ROOT\Directory\shell
- 桌面右键:
HKEY_CLASSES_ROOT\Directory\Background\shell
- 文件夹中右键:
新建项,命名
powershell7
。在
powershell7
项,右侧的默认项中写入 Open PowerShell Here在
powershell7
项,右侧新建字符串值。命名 Icon,写入C:\Program Files\PowerShell\7\pwsh.exe
在
powershell7
下新建项 ,命名command
。在
powershell7\command
项,右侧默认项中写入"C:\Program Files\PowerShell\7\pwsh.exe"
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!