win10测试通过,win7未知
git
@Echo Off
title Git绿色版右键菜单管理bat工具
SetLocal EnableDelayedExpansion
SET SourceFile=git-bash.exe
if exist !cd!\!SourceFile! (
echo 1.安装Git右键菜单
echo 2.卸载Git右键菜单
echo 0.退出
echo=
echo=
echo=
:start
Set /p u=请输入数字并按Enter确定:
IF !u!==1 (
@echo off
::git_gui
reg add>nul 2>nul "HKEY_CLASSES_ROOT\directory\background\shell\git_gui" /d "Git &GUI Here" /t "REG_SZ" /f
reg add>nul 2>nul "HKEY_CLASSES_ROOT\directory\background\shell\git_gui" /v "Icon" /d "!cd!\cmd\git-gui.exe" /t "REG_SZ" /f
reg add>nul 2>nul "HKEY_CLASSES_ROOT\directory\background\shell\git_gui\command" /d "\"!cd!\cmd\git-gui.exe\" \"--working-dir\" \"%%v.\"" /t "REG_SZ"