@echo off
Pushd %~dp0
Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行&&Pause >NUL&&Exit)
Rd "%WinDir%\System32\test_permissions" 2>NUL
if /i "%PROCESSOR_IDENTIFIER:~0,3%" == "X86" goto exits
if /i "%PROCESSOR_IDENTIFIER:~0,3%" NEQ "X86" goto setup 
:exits
@Echo On
Echo 当前系统不是64位操作系统，无法使用！请使用64位系统绿化本软件
exit
:setup
set BcShell=%~dp0BCShellEx64.dll
>nul 2>nul reg add “HKLM\SOFTWARE\Classes\*\ShellEx\ContextMenuHandlers\CirrusShellEx” /f /ve /t REG_SZ /d “{57FA2D12-D22D-490A-805A-5CB48E84F12A}”
>nul 2>nul reg add “HKLM\SOFTWARE\Classes\CLSID\{57FA2D12-D22D-490A-805A-5CB48E84F12A}” /f /ve /t REG_SZ /d “CirrusShellEx”
>nul 2>nul reg add “HKLM\SOFTWARE\Classes\CLSID\{57FA2D12-D22D-490A-805A-5CB48E84F12A}\InProcServer32″ /f /ve /t REG_SZ /d “%BcShell%”
>nul 2>nul reg add “HKLM\SOFTWARE\Classes\CLSID\{57FA2D12-D22D-490A-805A-5CB48E84F12A}\InProcServer32″ /f /v “ThreadingModel” /t REG_SZ /d “Apartment”
>nul 2>nul reg add “HKLM\SOFTWARE\Classes\Directory\ShellEx\ContextMenuHandlers\CirrusShellEx” /f /ve /t REG_SZ /d “{57FA2D12-D22D-490A-805A-5CB48E84F12A}”
>nul 2>nul reg add “HKLM\SOFTWARE\Classes\Folder\ShellEx\ContextMenuHandlers\CirrusShellEx” /f /ve /t REG_SZ /d “{57FA2D12-D22D-490A-805A-5CB48E84F12A}”
>nul 2>nul reg add “HKLM\SOFTWARE\Classes\lnkfile\ShellEx\ContextMenuHandlers\CirrusShellEx” /f /ve /t REG_SZ /d “{57FA2D12-D22D-490A-805A-5CB48E84F12A}”
>nul 2>nul reg add “HKCU\Software\Scooter Software\Beyond Compare 4″ /f /v SupportsMerge /t REG_DWORD /d 1
>nul 2>nul reg add “HKCU\Software\Scooter Software\Beyond Compare 4\BcShellEx” /f /v ArchiveMasks /t REG_SZ /d “*.7z;*.7z.001;*.arj;*.bcpkg;*.bcs;*.bcss;*.bz;*.bz2;*.cab;*.chm;*.cpio;*.cramfs;*.deb;*.dmg;*.ear;*.fat;*.flv;*.gz;*.hfs;*.img;*.iso;*.jar;*.lha;*.lzh;*.lzma;*.lzma86;*.mbr;*.nsis;*.ntfs;*.pmd;*.rar;*.rpm;*.safariextz;*.scap;*.squashfs;*.swf;*.swm;*.tar;*.tar.bz2;*.tar.gz;*.taz;*.tbz;*.tbz2;*.te;*.tgz;*.war;*.wim;*.xar;*.z;*.zip;*.zipx;”
>nul 2>nul reg add “HKCU\Software\Scooter Software\Beyond Compare 4\BcShellEx” /f /v CompareUsing /t REG_DWORD /d 2
>nul 2>nul reg add “HKCU\Software\Scooter Software\Beyond Compare 4\BcShellEx” /f /v Edit /t REG_DWORD /d 2
>nul 2>nul reg add “HKCU\Software\Scooter Software\Beyond Compare 4\BcShellEx” /f /v Merge /t REG_DWORD /d 2
>nul 2>nul reg add “HKCU\Software\Scooter Software\Beyond Compare 4\BcShellEx” /f /v Reg /t REG_DWORD /d 2
>nul 2>nul reg add “HKCU\Software\Scooter Software\Beyond Compare 4\BcShellEx” /f /v RegistryViewer /t REG_SZ /d “注册表比较”
>nul 2>nul reg add “HKCU\Software\Scooter Software\Beyond Compare 4\BcShellEx” /f /v SelectCenter /t REG_DWORD /d 2
>nul 2>nul reg add “HKCU\Software\Scooter Software\Beyond Compare 4\BcShellEx” /f /v Sync /t REG_DWORD /d 2
>nul 2>nul reg add “HKCU\Software\Scooter Software\Beyond Compare 4\BcShellEx” /f /v Viewers /t REG_SZ /d “文本比较(T);表格比较(B);16 进制比较(H);MP3 比较;图片比较(P);注册表比较(R);版本比较(V)”