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.\""
相关推荐
愿天堂没有C++4 小时前
C++——高性能组件
开发语言·c++·windows
小树苗m5 小时前
电脑本地摄像头做成rtsp流调用测试windows系统中
windows·电脑
许泽宇的技术分享6 小时前
「让AI大脑直连Windows桌面」:深度解析Windows-MCP,开启操作系统下一代智能交互
人工智能·windows·交互
ghhgy5316 小时前
Windows已经安装了一个MySQL8,通过修改配置文件的端口号跑2个或多个Mysql服务方法,并注册为系统服务
windows·mysql
qq_463944866 小时前
如何将新建的Anaconda虚拟环境导入Juputer内核中?
linux·windows·python
程序员黄同学2 天前
Python 的列表 list 和元组 tuple 有啥本质区别?啥时候用谁更合适?
windows·python·list
猎板PCB 邹亮2 天前
猎板PCB:专业键盘PCB板解决方案供应商
计算机外设·键盘·pcb工艺
小任今晚几点睡2 天前
Windows安装MySql8.0
windows
点灯小铭3 天前
基于STM32单片机的无线鼠标设计
stm32·单片机·计算机外设·毕业设计·课程设计
hongjunwu3 天前
Java集合的遍历方式(全解析)
java·开发语言·windows