|
说的复杂看不懂。我pe是这样的@ECHO OFF
PUSHD %~dp0
REGEDIT /S "%CD%\WinRAR.REG"
REG ADD HKCR\CLSID\{B41DB860-8EE4-11D2-9906-E49FADC173CA}\InProcServer32 /ve /t REG_SZ /d "%CD%\rarext.dll" /F >NUL
REG DELETE HKCR\.zip\ShellNew /F >NUL
REG ADD HKCR\WinRAR\DefaultIcon /ve /t REG_SZ /d "%CD%\WinRAR.exe,0" /F >NUL
REG ADD HKCR\WinRAR\shell\open\command /ve /t REG_SZ /d "\"%CD%\WinRAR.exe\" \"%%1\"" /F >NUL
REG ADD HKCR\WinRAR.REV\DefaultIcon /ve /t REG_SZ /d "%CD%\WinRAR.exe,1" /F >NUL
REG ADD HKCR\WinRAR.REV\shell\open\command /ve /t REG_SZ /d "\"%CD%\WinRAR.exe\" \"%%1\"" /F >NUL
REG ADD HKCR\WinRAR.ZIP\DefaultIcon /ve /t REG_SZ /d "%CD%\WinRAR.exe,0" /F >NUL
REG ADD HKCR\WinRAR.ZIP\shell\open\command /ve /t REG_SZ /d "\"%CD%\WinRAR.exe\" \"%%1\"" /F >NUL
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /ve /t REG_SZ /d "%CD%\WinRAR.exe" /F >NUL
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /v Path /t REG_SZ /d "%CD%\WinRAR" /F >NUL
If Not Exist "%SystemRoot%\System32\CABINET.DLL" GOTO END
REG ADD HKCR\.CAB /ve /t REG_SZ /d WinRAR /F>NUL
REG ADD HKCU\Software\WinRAR\Setup\.cab /v Set /t REG_DWORD /d 1 /F>NUL
REG ADD HKCU\Software\WinRAR\Setup\.cab /v Exist /t REG_DWORD /d 1 /F>NUL
REG ADD HKCU\Software\WinRAR\Setup\.cab /v Type /t REG_SZ /d "CLSID\{0CD7A5C0-9F37-11CE-AE65-08002B2E1262}" /F>NUL
REG ADD HKCU\Software\WinRAR\Setup\.cab /v Content /t REG_SZ /F>NUL
REG ADD HKCU\Software\WinRAR\Setup\.cab /v ShellNew /t REG_SZ /F>NUL
rem regsvr32.exe /s "%CD%\RarExt.dll"
reg add "HKLM\SOFTWARE\Classes\*\ShellEx\ContextMenuHandlers\WinRAR" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\CLSID\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d "WinRAR"
reg add "HKLM\SOFTWARE\Classes\CLSID\{B41DB860-64E4-11D2-9906-E49FADC173CA}\InProcServer32" /f /ve /t REG_SZ /d "%CD%\rarext.dll"
reg add "HKLM\SOFTWARE\Classes\CLSID\{B41DB860-64E4-11D2-9906-E49FADC173CA}\InProcServer32" /f /v "ThreadingModel" /t REG_SZ /d "Apartment"
reg add "HKLM\SOFTWARE\Classes\Directory\ShellEx\ContextMenuHandlers\WinRAR" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\Directory\ShellEx\DragDropHandlers\WinRAR" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\Drive\shellex\DragDropHandlers\WinRAR" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\exefile\shellex\PropertySheetHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d ""
reg add "HKLM\SOFTWARE\Classes\folder\ShellEx\ContextMenuHandlers\WinRAR" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\folder\ShellEx\DragDropHandlers\WinRAR" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\WinRAR" /f /ve /t REG_SZ /d "WinRAR 压缩文件"
reg add "HKLM\SOFTWARE\Classes\WinRAR\DefaultIcon" /f /ve /t REG_SZ /d "%CD%\WinRAR.exe,0"
reg add "HKLM\SOFTWARE\Classes\WinRAR\shell\open\command" /f /ve /t REG_SZ /d "\"%CD%\WinRAR.exe\" \"%%1\""
reg add "HKLM\SOFTWARE\Classes\WinRAR\shellex\ContextMenuHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d ""
reg add "HKLM\SOFTWARE\Classes\WinRAR\shellex\DropHandler" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\WinRAR\shellex\PropertySheetHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d ""
reg add "HKLM\SOFTWARE\Classes\WinRAR.REV" /f /ve /t REG_SZ /d "RAR 恢复卷"
reg add "HKLM\SOFTWARE\Classes\WinRAR.REV\DefaultIcon" /f /ve /t REG_SZ /d "%CD%\WinRAR.exe,1"
reg add "HKLM\SOFTWARE\Classes\WinRAR.REV\shell\open\command" /f /ve /t REG_SZ /d "\"%CD%\WinRAR.exe\" \"%%1\""
reg add "HKLM\SOFTWARE\Classes\WinRAR.ZIP" /f /ve /t REG_SZ /d "WinRAR ZIP 压缩文件"
reg add "HKLM\SOFTWARE\Classes\WinRAR.ZIP\DefaultIcon" /f /ve /t REG_SZ /d "%CD%\WinRAR.exe,0"
reg add "HKLM\SOFTWARE\Classes\WinRAR.ZIP\shell\open\command" /f /ve /t REG_SZ /d "\"%CD%\WinRAR.exe\" \"%%1\""
reg add "HKLM\SOFTWARE\Classes\WinRAR.ZIP\shellex\ContextMenuHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d ""
reg add "HKLM\SOFTWARE\Classes\WinRAR.ZIP\shellex\DropHandler" /f /ve /t REG_SZ /d "{B41DB860-64E4-11D2-9906-E49FADC173CA}"
reg add "HKLM\SOFTWARE\Classes\WinRAR.ZIP\shellex\PropertySheetHandlers\{B41DB860-64E4-11D2-9906-E49FADC173CA}" /f /ve /t REG_SZ /d ""
reg add "HKLM\SOFTWARE\WinRAR\Capabilities" /f /v "ApplicationDescription" /t REG_SZ /d "WinRAR"
reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".rar" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".zip" /t REG_SZ /d "WinRAR.ZIP"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".cab" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".arj" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".lzh" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".lha" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".ace" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".7z" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".tar" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".gz" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".tgz" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".uue" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".xxe" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".uu" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".bz2" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".tbz2" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".bz" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".tbz" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".jar" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".iso" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".z" /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\WinRAR\Capabilities\FileAssociations" /f /v ".taz" /t REG_SZ /d "WinRAR"
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /f /ve /t REG_SZ /d "%CD%\WinRAR.exe"
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe" /f /v "Path" /t REG_SZ /d "%CD%"
reg add "HKLM\SOFTWARE\Classes\.rar" /f /ve /t REG_SZ /d "WinRAR"
reg add "HKLM\SOFTWARE\Classes\.rar\ShellNew" /f /v "FileName" /t REG_SZ /d "%CD%\rarnew.dat"
rem reg add "HKLM\SOFTWARE\Classes\.zip" /f /ve /t REG_SZ /d "WinRAR.ZIP"
rem reg add "HKLM\SOFTWARE\Classes\.zip\ShellNew" /f /v "FileName" /t REG_SZ /d "%CD%\zipnew.dat"
rem reg add "HKLM\SOFTWARE\Classes\.cab" /f /ve /t REG_SZ /d "WinRAR"
rem rem reg add "HKLM\SOFTWARE\Classes\.7z" /f /ve /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\Classes\.tar" /f /ve /t REG_SZ /d "WinRAR"
rem reg add "HKLM\SOFTWARE\Classes\.Gz" /f /ve /t REG_SZ /d "WinRAR"
reg add "HKLM\SOFTWARE\WinRAR" /f /v "exe64" /t REG_SZ /d "%CD%\WinRAR.exe"
REGEDIT /S "%CD%\WinRAR.REG"
:END
EXIT |
|