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.\""
相关推荐
q***471819 小时前
Windows 上彻底卸载 Node.js
windows·node.js
柳暗花再明1 天前
Visio 中设置文本框背景透明的方法
人工智能·windows
天庭鸡腿哥1 天前
大小只有4K的软件,可让系统瞬间丝滑!
运维·服务器·windows·microsoft·everything
S9037845971 天前
为什么取模在除数等于2^n的时候可以用按位与替代?
java·tomcat·计算机外设·hibernate
啃火龙果的兔子1 天前
webview焦点与软键盘键盘交互详解
计算机外设·交互
人工智能训练1 天前
windows系统中的docker,xinference直接运行在容器目录和持载在宿主机目录中的区别
linux·服务器·人工智能·windows·ubuntu·docker·容器
q***65691 天前
Windows环境下安装Redis并设置Redis开机自启
数据库·windows·redis
q***47431 天前
Windows 和 Linux 系统下,如何查看 Redis 的版本号?
linux·windows·redis
q***96581 天前
Windows版Redis本地后台启动
数据库·windows·redis
yewq-cn1 天前
为什么 Windows 的镜像通常不能 dd 烧录
windows