beyond compare 增加右键快捷键

通过添加注册表的方式来解决beyond compare 添加到右键菜单;

建注册脚本registerMenu.bat,并将此脚本放在BC的目录执行;脚本内容如下:

@ECHO OFF
rem 请将此脚本放在BC的目录执行,例如 F:\Software\Beyond Compare

REM 将当前路径设为变量
SET BC3PATH=%~DP0
REM 创建用户配置文件,关闭初次启动程序时的设置向导
if exist "%USERPROFILE%\Application Data\Scooter Software\Beyond Compare 3" RD /q /s "%USERPROFILE%\Application Data\Scooter Software\Beyond Compare 3"
IF NOT EXIST "%USERPROFILE%\Application Data\Scooter Software\Beyond Compare 3" MD "%USERPROFILE%\Application Data\Scooter Software\Beyond Compare 3"
COPY /Y NUL "%USERPROFILE%\Application Data\Scooter Software\Beyond Compare 3\BCState.xml"
(
ECHO ^<?xml version="1.0" encoding="UTF-8"?^>
ECHO ^<!-- Produced by Beyond Compare 3 from Scooter Software --^>
ECHO ^<BCState^>
ECHO ^<TBcState^>
ECHO ^<FirstStartup Value="False"/^>
ECHO ^<FormPosStr Value="110;111;980;737"/^>
ECHO ^</TBcState^>
ECHO ^</BCState^>
) >> "%USERPROFILE%\Application Data\Scooter Software\Beyond Compare 3\BCState.xml"

REM 注册右键
reg add "HKLM\Software\Scooter Software\Beyond Compare 3" /v "ExePath" /t REG_SZ /d "%cd%\BCompare.exe" /f
rem reg add "HKLM\Software\Scooter Software\Beyond Compare 3" /v "Version" /t REG_SZ /d "3.1.7.10865" /f
reg add "HKCU\Software\Scooter Software\Beyond Compare 3" /v "ExePath" /t REG_SZ /d "%cd%\BCompare.exe" /f
rem reg add "HKCU\Software\Scooter Software\Beyond Compare 3" /v "Version" /t REG_SZ /d "3.1.7.10865" /f
reg add "HKCR\.bcpkg" /ve /t REG_SZ /d "BeyondCompare.SettingsPackage" /f
reg add "HKCR\BeyondCompare.SettingsPackage" /ve /t REG_SZ /d "Beyond Compare Settings Package" /f
reg add "HKCR\BeyondCompare.SettingsPackage\DefaultIcon" /ve /t REG_SZ /d "%cd%\BCompare.exe,0" /f
reg add "HKCR\BeyondCompare.SettingsPackage\shell\open\command" /ve /t REG_SZ /d "\"%cd%\BCompare.exe\" \"%%1\"" /f
reg add "HKCR\.bcss" /ve /t REG_SZ /d "BeyondCompare.Snapshot" /f
reg add "HKCR\BeyondCompare.Snapshot" /ve /t REG_SZ /d "Beyond Compare Snapshot" /f
reg add "HKCR\BeyondCompare.Snapshot\DefaultIcon" /ve /t REG_SZ /d "%cd%\BCompare.exe,0" /f
reg add "HKCR\BeyondCompare.Snapshot\shell\open\command" /ve /t REG_SZ /d "\"%cd%\BCompare.exe\" \"%%1\"" /f
reg add "HKLM\System\CurrentControlSet\Services\EventLog\Application\Beyond Compare 3" /v "EventMessageFile" /t REG_SZ /d "%cd%\BCompare.exe" /f
reg add "HKLM\System\CurrentControlSet\Services\EventLog\Application\Beyond Compare 3" /v "TypesSupported" /t REG_DWORD /d 7 /f


运行该脚本,重新打开BCompare.exe;点击:工具-->选项-->启动,就可以看到“在资源管理器上.....”的复选框,然后勾选上即可


点击需要比较的文件或目录,右键就可以选择“选择右键文件夹比较”了;

去掉资源管理器集成的方法:在BCompare.exe 目录下建注册脚本unregisterMenu.bat并运行,内容如下:

reg delete "HKLM\Software\Scooter Software" /f
reg delete "HKCU\Software\Scooter Software" /f
reg delete "HKCR\.bcpkg" /f
reg delete "HKCR\BeyondCompare.SettingsPackage" /f
reg delete "HKCR\.bcss" /ve /t REG_SZ /d "BeyondCompare.Snapshot" /f
reg delete "HKCR\BeyondCompare.Snapshot" /f
reg delete "HKLM\System\CurrentControlSet\Services\EventLog\Application\Beyond Compare 3" /f


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值