- @echo off
- set cz=右键增加CAB压缩与解压缩
- set reg=cab.reg
- cd.>%reg%
- echo>>%reg% Windows Registry Editor Version 5.00
- echo>>%reg% [HKEY_CLASSES_ROOT\*\shell\压缩成CAB格式单文件包]
- echo>>%reg% [HKEY_CLASSES_ROOT\*\shell\压缩成CAB格式单文件包\command]
- echo>>%reg% @="makecab /v3 /D CompressionType=LZX /D CompressionMemory=21 \"%%1\""
- echo>>%reg% [HKEY_CLASSES_ROOT\*\shell\解压缩CAB格式单文件包到当前文件夹]
- echo>>%reg% [HKEY_CLASSES_ROOT\*\shell\解压缩CAB格式单文件包到当前文件夹\command]
- echo>>%reg% @="expand -r \"%%1\""
- regedit /s %reg%
- del /f /q %reg%
- echo 操作结束-%cz%
- echo.
- EXIT
转载于:https://blog.51cto.com/liuxinyu/897790