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 小时前
自学C#,要懂得用好对象浏览器
windows·.net
qq_393828222 小时前
办公文档批量打印器 Word、PPT、Excel、PDF、图片和文本,它都支持批量打印。
windows·word·powerpoint·excel·软件需求
好名字更能让你们记住我2 小时前
Linux多线程(十二)之【生产者消费者模型】
linux·运维·服务器·jvm·windows·centos
单线程的Daniel2 小时前
Dubbo RPC 序列化问题记录
windows·rpc·dubbo
小毛驴8504 小时前
Windows 环境下设置 RabbitMQ 的 consumer_timeout 参数
windows·分布式·rabbitmq
马里马里奥-12 小时前
在Windows系统部署本地智能问答系统:基于百度云API完整教程
windows·云计算·百度云
曹勖之10 天前
simuilink和ROS2数据联通,Run后一直卡在Initializting
windows·matlab·simulink·ros2
浩浩测试一下10 天前
渗透测试指南(CS&&MSF):Windows 与 Linux 系统中的日志与文件痕迹清理
linux·运维·windows·安全·web安全·网络安全·系统安全
驱动小百科10 天前
如何在Windows上安装.NET Framework 详细教程分享
windows·.net·.net framework·.net安装·.net下载
斯密码赛我是美女10 天前
周报报报报
windows