@echo off
rem 这个软件用来解压多种压缩包到内存盘中
rem 如果解压失败则赋值 unpackerr=1
rem 如果带 -x 参数则运行解压后的 autorun.bat 批处理
if "%1"=="/?" goto _help
if "%1"=="" goto _help
set unpack_f=
:_cab
echo %1|find /i ".cab">NUL
if errorlevel 1 goto _rar
if exist %1 fpath %1|nset unpack_f=$1
if exist %1.cab fpath %1.cab|nset unpack_f=$1
for %%a in (%path%) do if exist %%a%1 set unpack_f=%%a%1
for %%a in (%path%) do if exist %%a\%1 set unpack_f=%%a\%1
for %%a in (%path%) do if exist %%a%1.cab set unpack_f=%%a%1.cab
for %%a in (%path%) do if exist %%a\%1.cab set unpack_f=%%a\%1.cab
if "%unpack_f%"=="" goto _nofile
set flag_f=cab
goto _unpack
:_rar
echo %1|find /i ".rar">NUL
if errorlevel 1 goto _zip
if exist %1 fpath %1|nset unpack_f=$1
if exist %1.rar fpath %1.rar|nset unpack_f=$1
for %%a in (%path%) do if exist %%a%1 set unpack_f=%%a%1
for %%a in (%path%) do if exist %%a\%1 set unpack_f=%%a\%1
for %%a in (%path%) do if exist %%a%1.rar set unpack_f=%%a%1.rar
for %%a in (%path%) do if exist %%a\%1.rar set unpack_f=%%a\%1.rar
if "%unpack_f%"=="" goto _nofile
set flag_f=rar
goto _unpack
:_zip
echo %1|find /i ".zip">NUL
if errorlevel 1 goto _arj
if exist %1 fpath %1|nset unpack_f=$1
if exist %1.zip fpath %1.zip|nset unpack_f=$1
for %%a in (%path%) do if exist %%a%1 set unpack_f=%%a%1
for %%a in (%path%) do if exist %%a\%1 set unpack_f=%%a\%1
for %%a in (%path%) do if exist %%a%1.zip set unpack_f=%%a%1.zip
for %%a in (%path%) do if exist %%a\%1.zip set unpack_f=%%a\%1.zip
if "%unpack_f%"=="" goto _nofile
set flag_f=zip
goto _unpack
:_arj
echo %1|find /i ".arj">NUL
if errorlevel 1 goto _uha
if exist %1 fpath %1|nset unpack_f=$1
if exist %1.arj fpath %1.arj|nset unpack_f=$1
for %%a in (%path%) do if exist %%a%1 set unpack_f=%%a%1
for %%a in (%path%) do if exist %%a\%1 set unpack_f=%%a\%1
for %%a in (%path%) do if exist %%a%1.arj set unpack_f=%%a%1.arj
for %%a in (%path%) do if exist %%a\%1.arj set unpack_f=%%a\%1.arj
if "%unpack_f%"=="" goto _nofile
set flag_f=arj
goto _unpack
:_uha
echo %1|find /i ".uha">NUL
if errorlevel 1 goto _img
if exist %1 fpath %1|nset unpack_f=$1
if exist %1.uha fpath %1.uha|nset unpack_f=$1
for %%a in (%path%) do if exist %%a%1 set unpack_f=%%a%1
for %%a in (%path%) do if exist %%a\%1 set unpack_f=%%a\%1
for %%a in (%path%) do if exist %%a%1.uha set unpack_f=%%a%1.uha
for %%a in (%path%) do if exist %%a\%1.uha set unpack_f=%%a\%1.uha
if "%unpack_f%"=="" goto _nofile
set flag_f=uha
goto _unpack
:_img
echo %1|find /i ".img">NUL
if errorlevel 1 goto _ima
if exist %1 fpath %1|nset unpack_f=$1
if exist %1.img fpath %1.img|nset unpack_f=$1
for %%a in (%path%) do if exist %%a%1 set unpack_f=%%a%1
for %%a in (%path%) do if exist %%a\%1 set unpack_f=%%a\%1
for %%a in (%path%) do if exist %%a%1.img set unpack_f=%%a%1.img
for %%a in (%path%) do if exist %%a\%1.img set unpack_f=%%a\%1.img
if "%unpack_f%"=="" goto _nofile
set flag_f=img
goto _unpack
:_ima
echo %1|find /i ".ima">NUL
if errorlevel 1 goto _iso
if exist %1 fpath %1|nset unpack_f=$1
if exist %1.ima fpath %1.ima|nset unpack_f=$1
for %%a in (%path%) do if exist %%a%1 set unpack_f=%%a%1
for %%a in (%path%) do if exist %%a\%1 set unpack_f=%%a\%1
for %%a in (%path%) do if exist %%a%1.ima set unpack_f=%%a%1.ima
for %%a in (%path%) do if exist %%a\%1.ima set unpack_f=%%a\%1.ima
if "%unpack_f%"=="" goto _nofile
set flag_f=ima
goto _unpack
:_unpack
if exist %ramdrive%\autorun.bat del %ramdrive%\autorun.bat
for %%a in (cab rar zip arj uha img ima) do if "%flag_f%"=="%%a" goto _noexec1
call vtm /p 不支持的文件格式,无法解压 %unpack_f%
goto _end
:_noexec1
call vtm /p UNPACK: 正在解压 "%unpack_f%"
if "%flag_f%"=="cab" extract.exe /y /l %ramdrive%\ /e %unpack_f% > %tmp%\extract.out
if "%flag_f%"=="rar" UNRAR.exe x -y %unpack_f% %ramdrive%\ > %tmp%\extract.out
if "%flag_f%"=="zip" PKUNZIP.exe -d -o %unpack_f% %ramdrive%\ > %tmp%\extract.out
if "%flag_f%"=="arj" UNARJ.exe x %unpack_f% %ramdrive%\ > %tmp%\extract.out
if "%flag_f%"=="uha" UHARC.exe x -y+ -t%ramdrive%\ %unpack_f% > %tmp%\extract.out
if "%flag_f%"=="img" UNDISK.exe %unpack_f% %ramdrive%\ /M /O > %tmp%\extract.out
if "%flag_f%"=="ima" UNDISK.exe %unpack_f% %ramdrive%\ /M /O > %tmp%\extract.out
if errorlevel 1 goto _unpackerr
set unpackerr=
if not exist %ramdrive%\autorun.bat goto _end
if not "%2" == "-x" goto _noexec
shift
for %%i in (9 8 7 6 5 4 3 2 1 0) do if not exist %ramdrive%\_autoru%%i.bat set unpack_a=_autoru%%i.bat
ren %ramdrive%\autorun.bat %unpack_a%
call %ramdrive%\%unpack_a% %2 %3 %4 %5 %6 %7 %8 %9
if not "%unpackerr%" == "" goto _end
for %%i in (0 1 2 3 4 5 6 7 8 9) do if exist %ramdrive%\_autoru%%i.bat set unpack_a=_autoru%%i.bat
del %ramdrive%\%unpack_a%
set unpack_a=
:_noexec
if exist %ramdrive%\autorun.bat del %ramdrive%\autorun.bat
goto _end
cabinet - Cabinet file (contains two or more files).
filename - Name of the file to extract from the cabinet.
Wild cards and multiple filenames (separated by
blanks) may be used.
source - Compressed file (a cabinet with only one file).
newname - New filename to give the extracted file.
If not supplied, the original name is used.
/A Process ALL cabinets. Follows cabinet chain
starting in first cabinet mentioned.
/C Copy source file to destination (to copy from DMF disks).
/D Display cabinet directory (use with filename to avoid extract).
/E Extract (use instead of *.* to extract all files).
/L dir Location to place extracted files (default is current directory).
/Y Do not prompt before overwriting an existing file.
PKUNZIP (R) FAST! Extract Utility Version 2.50 03-01-1999
Copr. 1989-1999 PKWARE Inc. All Rights Reserved. Shareware Version
PKUNZIP Reg. U.S. Pat. and Tm. Off.
-c[m] extract files to Console [with More]
-d restore/create Directory structure stored in .ZIP file
-e[c|d|e|n|p|r|s] Extract files. Sort by [CRC | Date | Extension | Name
| Percentage | Reverse | Size]
-f Freshen files in destination directory
-j|J<a,h,r,s> mask|don't mask <Hidden/System/Readonly> files (def.=jahrs)
-n extract only Newer files
-o Overwrite previously existing files
-p[a/b][c][#] extract to Printer [Asc mode,Bin mode,Com port] [port #]
-q Enable ANSI comments
-s[pwd] Decrypt with password [If no pwd is given, prompt for pwd]
-t Test .ZIP file integrity
-v[r][m][t] View .ZIP [Brief][Reverse][More][Technical] sort by [CRC|
[c,d,e,n,o,p,s] Date|Extension|Name|natural Order(default)|Percentage|Size]
-x<filespec> eXclude file(s) from extraction
-$ Restore volume label on destination drive
-@listfile Generate list file
Press 2 for advanced/trouble shooting options.
Press any other key to quit help.
If you use PKUNZIP on a regular basis you are strongly encouraged to register
it. With a full registration you will receive a comprehensive printed manual,
the latest version of PKZIP, PKUNZIP & PKSFX software, and discounts on
future upgrades of PKZIP for DOS and other platforms. See the documentation
for ordering and commercial & distribution licensing information.
PKWARE, Inc. Internet: www.pkware.com Phone: 414-354-8699
9025 N. Deerwood Drive Sales: sales@pkware.com Fax: 414-354-8559
Brown Deer, WI 53223 Tech supp.: support@pkware.com BBS: 414-354-8670
Usage: UHARC command [-switches..] archive[.uha] [files..@listfile..!exclude..]
---< Commands >----------------------------------------------------------------
a create archive and Add files e Extract files to current directory
m create archive and Move files x eXtract files with full pathname
l List files in archive t Test files in archive
---< Switches >----------------------------------------------------------------
d<0..2> Set display mode (0 = quiet, 1 = default, 2 = verbose)
m<0..3,x,z> Set cmp.mode (0 = STORE, 1..3 = ALZ:fast..best, x = PPM, z = LZP)
md<n> Set dictionary size in KByte (must be power of 2 : 1 .. 32768)
mm[-,+] Disable/enable built-in multimedia detection/compression
o[-,+,p] Overwrite existing files (- = never, + = always, p = prompt)
p<-,r,f,e> Store (- = no, r = relative, f = full, e = excluded) pathnames
ph[-,+] Archive header encryption | ac[-,+] Clear file archive attr
pw[passwd] Set password | ae<attr> Set attr exclusion mask
r[-,+] Recurse subdirectories | b<n> Set max filebuffer size
t<dir> Set extract target dir | bpb[-,+] bpb instead of % ratio
vm[-,+] Set virtual memory usage | ed[-,+] Store empty directories
y[-,+] Assume yes on all queries | lg<file> Log output to <file>
-------------------------------------------------------------------------------
UNARJ (Demo version) 2.65 Copyright (c) 1991-2002 ARJ Software, Inc.
Can't open /?.ARJ
UNDISK Version 1.6 Pro, expand all floppy disk image files tools
Copyright 1993.7,1995.2 (c)HomeSoft, written by Zhi-Hong Feng
Registered to [PD User] Compile Date:1996-11-15
Thanks: Jun Lei, written DUP pack-image file expand code
Hong Sun, Wan-jiang Wang, Guo-xiang qian, Wei Ye, Xin-yu Li,
Meng-lei Zhang test working
/?,/H Help!
/C Use chinese message
/E Use english message
/Fn expand image use format N
/G Ignore error
/I DIR IMAGE
/Lnnnn expand image use head size nnnn
/M expand file to mutli-directory
/N Only expand new files
/O overwrite previously existing files
/P Pause when expand a image
/V set target diskette volume
IMAGE Format code(more message see UNDISK.DOC):
1 DUP 3.0 8 DEC DISKIMAG
2 DISKDUPE 9 DISK CLONER
3 HD-COPY 1.7x 10 Sab Diskette
4 QCOPY Pro 11 DEC DUPDISK
5 COPYQM 12 PCSS COPYEZ
6 HD-COPY 1.7? 13 SWDI 3.3
7 Disk Image
Thank you use my UNDISK, if you have trouble, please call to me:
BP: 010-62568800 call 80486 Email:bjbroad@netchina.co.cn
My Name is: Zhi-Hong Feng
If you used CCDOS, UNDISK will print Chinese char and more message.
<Commands>
e Extract files to current directory
l[t,b] List archive [technical, bare]
p Print file to stdout
t Test archive files
v[t,b] Verbosely list archive [technical,bare]
x Extract files with full path
<Switches>
- Stop switches scanning
ad Append archive name to destination path
ap<path> Set path inside archive
av- Disable authenticity verification check
c- Disable comments show
cfg- Disable read configuration
cl Convert names to lower case
cu Convert names to upper case
dh Open shared files
ep Exclude paths from names
f Freshen files
idp Disable percentage display
ierr Send all messages to stderr
inul Disable all messages
kb Keep broken extracted files
o+ Overwrite existing files
o- Do not overwrite existing files
p[password] Set password
p- Do not query password
r Recurse subdirectories
ri<P>[:<S>] Set priority (0-default,1-min..15-max) and sleep time in ms
ta<date> Process files modified after <date> in YYYYMMDDHHMMSS format
tb<date> Process files modified before <date> in YYYYMMDDHHMMSS format
tn<time> Process files newer than <time>
to<time> Process files older than <time>
ts<m,c,a>[N] Save or restore file time (modification, creation, access)
u Update files
v List all volumes
ver[n] File version control
vp Pause before each volume
x<file> Exclude specified file
x@ Read file names to exclude from stdin
x@<list> Exclude files in specified list file
y Assume Yes on all queries