目前是在Beyond Compare 3.1.9版本上试验可行,其他版本上尚未测试。
添加右键菜单步骤:
1.新建为.bat后缀的文本,将下面“添加右键菜单批处理”复制到此文本中。
2.将批处理移动到Beyond Compare 3安装目录。
3.双击批处理开始执行。
4.打开Beyond Compare 3软件,工具->选项->启动,勾选“在资源管理器关联菜单中显示Beyond Compare”。
5.重启电脑。
6.取消右键菜单批处理也需要在Beyond Compare 3安装目录下执行。
添加右键菜单批处理
1@ECHO OFF 2rem 请将此脚本放在BC的目录执行,例如 F:\Software\Beyond Compare 3 4REM 将当前路径设为变量 5SET BC3PATH=%~DP0 6REM 创建用户配置文件,关闭初次启动程序时的设置向导 7if exist "%USERPROFILE%\Application Data\Scooter Software\Beyond Compare 3" RD /q /s "%USERPROFILE%\Application Data\Scooter Software\Beyond Compare 3" 8IF NOT EXIST "%USERPROFILE%\Application Data\Scooter Software\Beyond Compare 3" MD "%USERPROFILE%\Application Data\Scooter Software\Beyond Compare 3" 9COPY /Y NUL "%USERPROFILE%\Application Data\Scooter Software\Beyond Compare 3\BCState.xml" 10( 11ECHO ^<?xml version="1.0" encoding="UTF-8"?^> 12ECHO ^<!-- Produced by Beyond Compare 3 from Scooter Software --^> 13ECHO ^<BCState^> 14ECHO ^<TBcState^> 15ECHO ^<FirstStartup Value="False"/^> 16ECHO ^<FormPosStr Value="110;111;980;737"/^> 17ECHO ^</TBcState^> 18ECHO ^</BCState^> 19) >> "%USERPROFILE%\Application Data\Scooter Software\Beyond Compare 3\BCState.xml" 20 21REM 注册右键 22reg add "HKLM\Software\Scooter Software\Beyond Compare 3" /v "ExePath" /t REG_SZ /d "%cd%\BCompare.exe" /f 23rem reg add "HKLM\Software\Scooter Software\Beyond Compare 3" /v "Version" /t REG_SZ /d "3.1.7.10865" /f 24reg add "HKCU\Software\Scooter Software\Beyond Compare 3" /v "ExePath" /t REG_SZ /d "%cd%\BCompare.exe" /f 25rem reg add "HKCU\Software\Scooter Software\Beyond Compare 3" /v "Version" /t REG_SZ /d "3.1.7.10865" /f 26reg add "HKCR\.bcpkg" /ve /t REG_SZ /d "BeyondCompare.SettingsPackage" /f 27reg add "HKCR\BeyondCompare.SettingsPackage" /ve /t REG_SZ /d "Beyond Compare Settings Package" /f 28reg add "HKCR\BeyondCompare.SettingsPackage\DefaultIcon" /ve /t REG_SZ /d "%cd%\BCompare.exe,0" /f 29reg add "HKCR\BeyondCompare.SettingsPackage\shell\open\command" /ve /t REG_SZ /d "\"%cd%\BCompare.exe\" \"%%1\"" /f 30reg add "HKCR\.bcss" /ve /t REG_SZ /d "BeyondCompare.Snapshot" /f 31reg add "HKCR\BeyondCompare.Snapshot" /ve /t REG_SZ /d "Beyond Compare Snapshot" /f 32reg add "HKCR\BeyondCompare.Snapshot\DefaultIcon" /ve /t REG_SZ /d "%cd%\BCompare.exe,0" /f 33reg add "HKCR\BeyondCompare.Snapshot\shell\open\command" /ve /t REG_SZ /d "\"%cd%\BCompare.exe\" \"%%1\"" /f 34reg add "HKLM\System\CurrentControlSet\Services\EventLog\Application\Beyond Compare 3" /v "EventMessageFile" /t REG_SZ /d "%cd%\BCompare.exe" /f 35reg add "HKLM\System\CurrentControlSet\Services\EventLog\Application\Beyond Compare 3" /v "TypesSupported" /t REG_DWORD /d 7 /f
取消右键菜单批处理
1reg delete "HKLM\Software\Scooter Software" /f 2reg delete "HKCU\Software\Scooter Software" /f 3reg delete "HKCR\.bcpkg" /f 4reg delete "HKCR\BeyondCompare.SettingsPackage" /f 5reg delete "HKCR\.bcss" /ve /t REG_SZ /d "BeyondCompare.Snapshot" /f 6reg delete "HKCR\BeyondCompare.Snapshot" /f 7reg delete "HKLM\System\CurrentControlSet\Services\EventLog\Application\Beyond Compare 3" /f 8pause