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.\""
相关推荐
L_cl4 小时前
【NLP 75、如何通过API调用智谱大模型】
linux·服务器·windows
海尔辛4 小时前
学习黑客Active Directory 入门指南(一)
windows·学习·ad
※※冰馨※※4 小时前
彻底解决QT5 中文编译不过问题
c++·windows·qt
love530love4 小时前
【笔记】记一次PyCharm的问题反馈
ide·人工智能·windows·笔记·python·pycharm
范纹杉想快点毕业5 小时前
以项目的方式学QT开发C++(二)——超详细讲解(120000多字详细讲解,涵盖qt大量知识)逐步更新!
c语言·开发语言·c++·windows·vscode·qt·visual studio
兔子坨坨5 小时前
pycharm连接github(详细步骤)
windows·git·学习·pycharm·github
Superstarimage9 小时前
使用conda创建python虚拟环境,并自定义路径
windows·python·conda
Evaporator Core15 小时前
深入探索:Core Web Vitals 进阶优化与新兴指标
前端·windows
Mcworld85716 小时前
java集合
java·开发语言·windows
hnlucky16 小时前
windows编写和调试代码工具——IDE安装
ide·windows