|
本帖最后由 cookoe 于 2020-5-2 13:06 编辑
idm下载绿化,exec执行无效没反应,但是进系统双击执行可以顺利完成并正常使用BCompare右键关联,在64位系统中正常使用,求大神改成32位系统可以正常使用:- @ECHO OFF & CD /D "%~DP0" & TITLE 添加右键
- >NUL 2>&1 REG.exe query "HKU\S-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 "HKCU\Software\Scooter Software\Beyond Compare" /f /v ExePath /d ""%CurDir%\BCompare.exe"" >NUL
- reg add "HKCU\SOFTWARE\Scooter Software\Beyond Compare 4" /f /v ExePath /d ""%CurDir%\BCompare.exe"" >NUL
- reg add "HKCU\SOFTWARE\Scooter Software\Beyond Compare 4\BcShellEx" /f /v SavedLeft /d ""%CurDir%\BCompare.exe"" >NUL
- reg add "HKLM\SOFTWARE\WOW6432Node\Scooter Software\Beyond Compare" /f /v ExePath /d ""%CurDir%\BCompare.exe"" >NUL
- reg add "HKLM\SOFTWARE\WOW6432Node\Scooter Software\Beyond Compare 4" /f /v ExePath /d ""%CurDir%\BCompare.exe"" >NUL
- reg add "HKLM\SOFTWARE\WOW6432Node\Scooter Software\Beyond Compare 4\BcShellEx" /f /v SavedLeft /d ""%CurDir%\BCompare.exe"" >NUL
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\BCompare.exe" /f /ve /d ""%CurDir%\BCompare.exe"" >NUL
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\BCompare.exe" /f /v UseURL /t REG_DWORD /d "1" >NUL
- reg add "HKLM\SOFTWARE\Classes\.bcss" /f /ve /d "BeyondCompare.Snapshot" >NUL
- reg add "HKLM\SOFTWARE\Classes\BeyondCompare.Snapshot" /f /ve /d "Beyond Compare Snapshot" >NUL
- reg add "HKLM\SOFTWARE\Classes\BeyondCompare.Snapshot\DefaultIcon" /f /ve /d ""%CurDir%\BCompare.exe,0"" >NUL
- reg add "HKLM\SOFTWARE\Classes\BeyondCompare.Snapshot\shell\open\command" /f /ve /d ""%CurDir%\BCompare.exe" "%%1"" >NUL
- reg add "HKLM\SOFTWARE\Classes\.bcpkg" /f /ve /d "BeyondCompare.SettingsPackage" >NUL
- reg add "HKLM\SOFTWARE\Classes\BeyondCompare.SettingsPackage" /f /ve /d "Beyond Compare Settings Package" >NUL
- reg add "HKLM\SOFTWARE\Classes\BeyondCompare.SettingsPackage" /f /v EditFlags /t REG_DWORD /d "0x00100000" >NUL
- reg add "HKLM\SOFTWARE\Classes\BeyondCompare.SettingsPackage\DefaultIcon" /f /ve /d ""%CurDir%\BCompare.exe,0"" >NUL
- reg add "HKLM\SOFTWARE\Classes\BeyondCompare.SettingsPackage\shell\open\command" /f /ve /d ""%CurDir%\BCompare.exe" "%%1"" >NUL
- reg add "HKLM\SOFTWARE\Classes\CLSID\{57FA2D12-D22D-490A-805A-5CB48E84F12A}" /f /ve /d "CirrusShellEx" >NUL
- reg add "HKLM\SOFTWARE\Classes\CLSID\{57FA2D12-D22D-490A-805A-5CB48E84F12A}\InProcServer32" /f /ve /d ""%CurDir%\BCShellEx.dll"" >NUL
- reg add "HKLM\SOFTWARE\Classes\CLSID\{57FA2D12-D22D-490A-805A-5CB48E84F12A}\InProcServer32" /f /v ThreadingModel /d "Apartment" >NUL
- reg add "HKLM\SOFTWARE\Classes\*\shellex\ContextMenuHandlers\CirrusShellEx" /f /ve /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" >NUL
- reg add "HKLM\SOFTWARE\Classes\Folder\shellex\ContextMenuHandlers\CirrusShellEx" /f /ve /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" >NUL
- reg add "HKLM\SOFTWARE\Classes\lnkfile\shellex\ContextMenuHandlers\CirrusShellEx" /f /ve /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" >NUL
- reg add "HKLM\SOFTWARE\Classes\Directory\shellex\ContextMenuHandlers\CirrusShellEx" /f /ve /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" >NUL
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" /f /v {57FA2D12-D22D-490A-805A-5CB48E84F12A} /d "Beyond Compare 4 Shell Extension" >NUL
- reg add "HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\Beyond Compare 4" /f /v TypesSupported /t REG_DWORD /d "7" >NUL
- reg add "HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\Beyond Compare 4" /f /v EventMessageFile /d ""%CurDir%\BCompare.exe"" >NUL
- mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\BC文件比较.lnk""):b.TargetPath=""%~DP0BCompare.exe"":b.WorkingDirectory=""%~DP0"":b.Save:close")
复制代码 官方提供的正版添加鼠标右键cmd- reg add "HKLM\SOFTWARE\Classes\CLSID\{57FA2D12-D22D-490A-805A-5CB48E84F12A}" /f /ve /t REG_SZ /d "CirrusShellEx"
- reg add "HKLM\SOFTWARE\Classes\CLSID\{57FA2D12-D22D-490A-805A-5CB48E84F12A}\InProcServer32" /f /ve /t REG_SZ /d "%CurDir%\BCShellEx.dll"
- reg add "HKLM\SOFTWARE\Classes\CLSID\{57FA2D12-D22D-490A-805A-5CB48E84F12A}\InProcServer32" /f /v "ThreadingModel" /t REG_SZ /d "Apartment"
- reg add "HKLM\SOFTWARE\Classes\*\shellex\ContextMenuHandlers\CirrusShellEx" /f /ve /t REG_SZ /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}"
- reg add "HKLM\SOFTWARE\Classes\Directory\shellex\ContextMenuHandlers\CirrusShellEx" /f /ve /t REG_SZ /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}"
- reg add "HKLM\SOFTWARE\Classes\Folder\shellex\ContextMenuHandlers\CirrusShellEx" /f /ve /t REG_SZ /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}"
- reg add "HKLM\SOFTWARE\Classes\lnkfile\shellex\ContextMenuHandlers\CirrusShellEx" /f /ve /t REG_SZ /d "{57FA2D12-D22D-490A-805A-5CB48E84F12A}"
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" /f /v "{57FA2D12-D22D-490A-805A-5CB48E84F12A}" /t REG_SZ /d "Beyond Compare 4 Shell Extension"
复制代码
|
|