Beyond Compare 是个优秀的工具,我们经常用于对比文件和文件夹,右键点点就可以调用对比,着实很方便.但从
3.2版本之前,我们可以从设置中将bc关联到文件夹和文件右键,但之后的版本已经找不到此设置选项.
没有此选项每次要先打开bc,然后再选择要比较的文件或文件夹,造成一定的麻烦,也不怎么习惯.
我们可以通过手动添加注册表的方式来解决. 为方便大家,线提供组织好的批处理一份,只需将批处理保存运行即可.
运行此bat后右击文件/文件夹,右键菜单中出现2个菜单ad:
选择左侧文件(夹)比较(L)
与 XXXX 比较(C)
BC3添加右键菜单.bat
-
@ECHO OFF
-
rem 请将此脚本放在BC的目录执行,例如 F:\Software\Beyond Compare
-
-
REM 将当前路径设为变量
-
SET BC3PATH=%~DP0
-
REM 创建用户配置文件,关闭初次启动程序时的设置向导
-
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 "HKCR\*\shellex\ContextMenuHandlers\CirrusShellEx" /ve /t REG_SZ /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" /f
-
REG ADD "HKCR\CLSID\{57FA2D12-D22D-490A-805A-5CB48E84F12A}" /ve /t REG_SZ /d "CirrusShellEx" /f
-
REG ADD "HKCR\CLSID\{57FA2D12-D22D-490A-805A-5CB48E84F12A}\InProcServer32" /ve /t REG_SZ /d "%BC3PATH%BCShellEx.dll" /f
-
REG ADD "HKCR\CLSID\{57FA2D12-D22D-490A-805A-5CB48E84F12A}\InProcServer32" /v "ThreadingModel" /t REG_SZ /d "Apartment" /f
-
REG ADD "HKCR\Directory\shellex\ContextMenuHandlers\CirrusShellEx" /ve /t REG_SZ /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" /f
-
REG ADD "HKCR\Folder\shellex\ContextMenuHandlers\CirrusShellEx" /ve /t REG_SZ /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" /f
-
REG ADD "HKCR\lnkfile\shellex\ContextMenuHandlers\CirrusShellEx" /ve /t REG_SZ /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" /f
-
REM 程序基本设置
-
REG ADD "HKCU\Software\Scooter Software\Beyond Compare 3" /v "SupportsMerge" /t REG_DWORD /d 0x1 /f
-
REG ADD "HKCU\Software\Scooter Software\Beyond Compare 3\BcShellEx" /v "Viewers" /t REG_SZ /d "Text Compare;Data Compare;Hex Compare;MP3 Compare;Picture Compare;Version Compare" /f
-
REG ADD "HKCU\Software\Scooter Software\Beyond Compare 3\BcShellEx" /v "ArchiveMasks" /t REG_SZ /d "*.7z;*.7z.001;*.bcpkg;*.bcs;*.bcss;*.cab;*.chm;*.ear;*.gz;*.jar;*.rar;*.tar;*.tar.gz;*.tgz;*.war;*.zip;" /f
-
REM 注册右键
-
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" /v "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" /t REG_SZ /d "Beyond Compare 3 Shell Extension" /f
-
GOTO :EOF
see also:
文件夹比较工具:Beyond Compare可用授权注册码
阅读(20895) | 评论(0) | 转发(0) |