beyond compare添加右键比较功能

beyond compare添加右键比较功能,第1张

beyond compare添加右键比较功能

编写一个添加右键批处理脚本

@ECHO OFF & CD /D "%~DP0" & TITLE 添加右键 www.ddooo.com
>NUL 2>&1 REG.exe query "HKUS-1-5-19" || (
    ECHO SET UAC = CreateObject^("Shell.Application"^) > "%TEMP%Getadmin.vbs"
    ECHO UAC.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%TEMP%Getadmin.vbs"
    "%TEMP%Getadmin.vbs"
    DEL /f /q "%TEMP%Getadmin.vbs" 2>NUL
    Exit /b
)

reg add "HKCUSoftwareScooter SoftwareBeyond Compare" /f /v ExePath /d ""%CD%BCompare.exe"" >NUL
reg add "HKCUSOFTWAREScooter SoftwareBeyond Compare 4" /f /v ExePath /d ""%CD%BCompare.exe"" >NUL
reg add "HKCUSOFTWAREScooter SoftwareBeyond Compare 4BcShellEx" /f /v SavedLeft /d ""%CD%BCompare.exe"" >NUL
reg add "HKLMSOFTWAREWOW6432NodeScooter SoftwareBeyond Compare" /f /v ExePath /d ""%CD%BCompare.exe"" >NUL
reg add "HKLMSOFTWAREWOW6432NodeScooter SoftwareBeyond Compare 4" /f /v ExePath /d ""%CD%BCompare.exe"" >NUL
reg add "HKLMSOFTWAREWOW6432NodeScooter SoftwareBeyond Compare 4BcShellEx" /f /v SavedLeft /d ""%CD%BCompare.exe"" >NUL

reg add "HKLMSOFTWAREMicrosoftWindowsCurrentVersionApp PathsBCompare.exe" /f /ve /d ""%CD%BCompare.exe"" >NUL
reg add "HKLMSOFTWAREMicrosoftWindowsCurrentVersionApp PathsBCompare.exe" /f /v UseURL /t REG_DWORD /d "1" >NUL 

reg add "HKLMSOFTWAREClasses.bcss" /f /ve /d "BeyondCompare.Snapshot" >NUL
reg add "HKLMSOFTWAREClassesBeyondCompare.Snapshot" /f /ve /d "Beyond Compare Snapshot" >NUL
reg add "HKLMSOFTWAREClassesBeyondCompare.SnapshotDefaultIcon" /f /ve /d ""%CD%BCompare.exe,0"" >NUL
reg add "HKLMSOFTWAREClassesBeyondCompare.Snapshotshellopencommand" /f /ve /d ""%CD%BCompare.exe" "%%1"" >NUL

reg add "HKLMSOFTWAREClasses.bcpkg" /f /ve /d "BeyondCompare.SettingsPackage" >NUL
reg add "HKLMSOFTWAREClassesBeyondCompare.SettingsPackage" /f /ve /d "Beyond Compare Settings Package" >NUL
reg add "HKLMSOFTWAREClassesBeyondCompare.SettingsPackage" /f /v EditFlags /t REG_DWORD /d "0x00100000" >NUL
reg add "HKLMSOFTWAREClassesBeyondCompare.SettingsPackageDefaultIcon" /f /ve /d ""%CD%BCompare.exe,0"" >NUL
reg add "HKLMSOFTWAREClassesBeyondCompare.SettingsPackageshellopencommand" /f /ve /d ""%CD%BCompare.exe" "%%1"" >NUL

reg add "HKLMSOFTWAREClassesCLSID{57FA2D12-D22D-490A-805A-5CB48E84F12A}" /f /ve /d "CirrusShellEx" >NUL
reg add "HKLMSOFTWAREClassesCLSID{57FA2D12-D22D-490A-805A-5CB48E84F12A}InProcServer32" /f /ve /d ""%CD%BCShellEx64.dll"" >NUL
reg add "HKLMSOFTWAREClassesCLSID{57FA2D12-D22D-490A-805A-5CB48E84F12A}InProcServer32" /f /v ThreadingModel /d "Apartment" >NUL

reg add "HKLMSOFTWAREClasses*shellexContextMenuHandlersCirrusShellEx" /f /ve /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" >NUL
reg add "HKLMSOFTWAREClassesFoldershellexContextMenuHandlersCirrusShellEx" /f /ve /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" >NUL
reg add "HKLMSOFTWAREClasseslnkfileshellexContextMenuHandlersCirrusShellEx" /f /ve /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" >NUL
reg add "HKLMSOFTWAREClassesDirectoryshellexContextMenuHandlersCirrusShellEx" /f /ve /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" >NUL

reg add "HKLMSOFTWAREMicrosoftWindowsCurrentVersionShell ExtensionsApproved" /f /v {57FA2D12-D22D-490A-805A-5CB48E84F12A} /d "Beyond Compare 4 Shell Extension" >NUL

reg add "HKLMSYSTEMCurrentControlSetServicesEventLogApplicationBeyond Compare 4" /f /v TypesSupported /t REG_DWORD /d "7" >NUL 
reg add "HKLMSYSTEMCurrentControlSetServicesEventLogApplicationBeyond Compare 4" /f /v EventMessageFile /d ""%CD%BCompare.exe"" >NUL

ECHO.&ECHO 添加完成!创建快捷方式?
ECHO.&ECHO 是按任意键,否直接关闭!&PAUSE >NUL 2>NUL

mshta VBscript:Execute("Set a=CreateObject(""Wscript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""BCompare.lnk""):b.TargetPath=""%~DP0BCompare.exe"":b.WorkingDirectory=""%~DP0"":b.Save:close")

CLS &ECHO.&ECHO 完成!&PAUSE >NUL 2>NUL & EXIT

删除右键的脚本:

@ECHO OFF & CD /D %~DP0 & TITLE ɾ³ýÓÒ¼ü www.Laomo.me
>NUL 2>&1 REG.exe query "HKUS-1-5-19" || (
    ECHO SET UAC = CreateObject^("Shell.Application"^) > "%TEMP%Getadmin.vbs"
    ECHO UAC.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%TEMP%Getadmin.vbs"
    "%TEMP%Getadmin.vbs"
    DEL /f /q "%TEMP%Getadmin.vbs" 2>NUL
    Exit /b
)

reg delete "HKLMSOFTWAREClasses.bcss" /F>NUL 2>NUL
reg delete "HKLMSOFTWAREClasses.bcpkg" /F>NUL 2>NUL
reg delete "HKLMSOFTWAREClassesBeyondCompare.Snapshot" /F>NUL 2>NUL
reg delete "HKLMSOFTWAREClassesBeyondCompare.SettingsPackage" /F>NUL 2>NUL

reg delete "HKCUSOFTWAREScooter SoftwareBeyond Compare" /F>NUL 2>NUL
reg delete "HKLMSOFTWAREScooter SoftwareBeyond Compare" /F>NUL 2>NUL
reg delete "HKLMSOFTWAREScooter SoftwareBeyond Compare 4" /F>NUL 2>NUL
reg delete "HKCUSOFTWAREScooter SoftwareBeyond Compare 4" /F>NUL 2>NUL
reg delete "HKLMSOFTWAREWOW6432NodeScooter SoftwareBeyond Compare" /F>NUL 2>NUL
reg delete "HKLMSOFTWAREWOW6432NodeScooter SoftwareBeyond Compare 4" /F>NUL 2>NUL
reg delete "HKLMSOFTWAREMicrosoftWindowsCurrentVersionApp PathsBCompare.exe" /F>NUL 2>NUL
reg delete "HKLMSOFTWAREClassesCLSID{57FA2D12-D22D-490A-805A-5CB48E84F12A}" /F>NUL 2>NUL
reg delete "HKLMSYSTEMCurrentControlSetServicesEventLogApplicationBeyond Compare 4" /F>NUL 2>NUL
reg delete "HKLMSOFTWAREMicrosoftWindowsCurrentVersionShell ExtensionsApproved" /v {57FA2D12-D22D-490A-805A-5CB48E84F12A} /F>NUL 2>NUL


ECHO. &ECHO Íê³É£¡&PAUSE >NUL 2>NUL & EXIT

 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5692890.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存