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.\""
相关推荐
IT小哥哥呀3 小时前
5 个 Windows 故障排除工具
windows·故障排除·系统运维·windows系统·电脑问题
应用市场5 小时前
构建自定义命令行工具 - 打造专属指令体
开发语言·windows·python
东方佑5 小时前
从字符串中提取重复子串的Python算法解析
windows·python·算法
Warren9810 小时前
复习MySQL
数据库·windows·tcp/ip·mysql·ubuntu·ssh·ansible
低调小一13 小时前
KuiklyUI 科普:UI 如何映射到 Android View 并完成渲染
android·windows·ui
九江Mgx14 小时前
使用 Go + govcl 实现 Windows 资源管理器快捷方式管理器
windows·golang·govcl
路由侠内网穿透15 小时前
本地部署开源数据分析平台 Elastic Stack 并实现外部访问( Windows 版本)
运维·服务器·网络·windows·开源·jenkins
至善迎风18 小时前
将跨平台框架或游戏引擎开发的 Windows 应用上架 Microsoft Store
windows·microsoft·游戏引擎
皮皮冰燃18 小时前
关系数据库-10-[mysql5和mysql8]在windows中安装为服务并共存
windows·mysql
太空1号18 小时前
VxWorks入门小白菜鸟教程3 —— 编译运行VxWorksSDK示例hello_cmake_rtp(Windows篇)
windows·嵌入式硬件