windows手动添加鼠标右键弹窗快捷方式

此处以添加Git Bash Here为例

一.操作步骤

  1. Win + R 键打开 运行 对话框,输入 regedit,并按下回车,打开注册表编辑器。

  2. 导航到 HKEY_CLASSES_ROOT\Directory\Background\shell

  3. 右键单击 shell,选择 新建 ,并命名为 Git Bash Here

  4. 右键新建的项 Git Bash Here,选择 新建字符串值 ,命名为 Icon,然后将其值设置为 Git 安装目录下的 bash.exe 文件的路径(例如:E:\Git\bin\bash.exe)。

  5. Git Bash Here 项下,右键单击并选择 新建 ,命名为 command

  6. command 项下,右键单击并选择 修改 ,然后将其值设置为 Git 安装目录下的 bash.exe,并加上参数 --login -i(例如:E:\Git\bin\bash.exe --login -i)。

二.注册表文件

也可以写成*.reg文件,直接双击添加到本机注册表,快捷方便

git_gui.reg

bash 复制代码
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\git_gui]
@="Git &GUI Here"
"Icon"="E:\\Git\\cmd\\git-gui.exe"

[HKEY_CLASSES_ROOT\Directory\Background\shell\git_gui\command]
@="\"E:\\Git\\cmd\\git-gui.exe\" \"--working-dir\" \"%v.\""

git_shell.reg

bash 复制代码
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell]
@="Git Ba&sh Here"
"Icon"="E:\\Git\\git-bash.exe"

[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell\command]
@="\"E:\\Git\\git-bash.exe\" \"--cd=%v.\""
相关推荐
天庭鸡腿哥1 小时前
突破SV1P限制,悄咪咪使用!
windows·microsoft·visual studio
广都--编程每日问2 小时前
c++右键菜单统一转化文件为utf8编码
c++·windows·python
伐尘2 小时前
【MySQL】windows系统下mysql慢日志查询
windows·mysql·adb
私人珍藏库2 小时前
[Windows] 隐写者 SteganographierGUI 1.3.8
windows·pc·工具·软件
weixin_387002152 小时前
二次开发的openssl在windows平台的编译
linux·windows·安全·ssl
划水的code搬运工小李3 小时前
控制底盘采集环境数据(一)- 键盘控制
计算机外设
eguid_13 小时前
【软件分享】简单的Windows无线电视投屏软件simpleTVCast,支持桌面镜像投屏和视频投屏
windows·电视投屏·音视频投屏·镜像投屏·桌面镜像投屏
码韵3 小时前
【生活常识】(一)部分常用接口的引脚定义
计算机外设
摇滚侠4 小时前
Macbook,鼠标滚轮不丝滑,感觉别扭
计算机外设
天天进步20154 小时前
UFO 源码实战 (3):它怎么“点”鼠标的?通过源码掌握 Windows 自动化控制
windows·自动化