应该是用MAKECAB.EXE来压缩吧?
Microsoft (R) Cabinet Maker - Version (32) 1.00.603.4 (06/25/98)
Copyright (c) Microsoft Corp 1993-1998. All rights reserved.MAKECAB [/V[n]] [/D var=value ...] [/L dir] source [destination]
MAKECAB [/V[n]] [/D var=value ...] /F directive_file [...]  source         File to compress.
  destination    File name to give compressed file.  If omitted, the
                 last character of the source file name is replaced
                 with an underscore (_) and used as the destination.
  /F directives  A file with MakeCAB directives (may be repeated).
  /D var=value   Defines variable with specified value.
  /L dir         Location to place destination (default is current directory).
  /V[n]          Verbosity level (1..3).

解决方案 »

  1.   

    如何在 VB 中使用 Winzip 来压缩文件? 
    版本:VB6 / VB5 / VB4-32 现在压缩软件一大堆,但是如果您想在 VB 程式中做文件压缩的功能,您知道要怎么做吗?我不懂一些烦琐的压缩理论,但是我懂得利用现有的压缩软件来替我达到我想要的功能!在这个例子中,我要使用 Winzip 来做,所以,如果您想用下面的示例来做练习的话,先決条件就是您的电脑中一定要有安装 Winzip 才行!压缩文件 (加入文件):语法:winzip[32].exe [-min] action [options] filename[.zip] files参数说明:-min 最小化
    指定 Winzip 执行时为最小化。如果您要使用 -min 这个参数,它必须是命令列参数的第一个参数。action 方法-a add 加入文件 
    -f freshen 重新整理目前文件 
    -u update 更新文件 
    -m move 移动文件 options 选项Directories 文件夹选项 
    -r Recurse Directories 含文件夹內內容。 
    -p Save Extra Directory Info 储存其他的文件夹信息。 
    method 決定压缩的方法选项 
    -ex eXtra 最大 (最慢) 
    -en Normal 一般 (默认值) 
    -ef Fast 快速 
    -es Super fast 最快速 
    -e0 no compression 不压缩 
    其他选项 
    -s 设定密码 密码必须使用双引号括起来。
    例如:-s "Secret Password",不过要注意大小写是不同的! 
    -hs   包含符合条件的隐藏及系统文件。 filename.zip 压缩文件名
    指定压缩后的文件名,要注意的是必须是全路径文件名 (含磁碟機代号及文件夹)。
    files 所有原始文件
    一个或多个文件,每一个文件写在獨立的一行,可以使用萬用字元,例如:*.bak。
    解压缩文件:语法:winzip[32].exe -e [options] filename[.zip] directory参数说明:-e 表示解压缩
    是必要的参数!options 选项-o Overwrite existing files 
    without prompting 取代同名的文件。 
    -j Junk pathnames 跳過舊文件。
    除非指定 -J 这个参数,否則会使用原本的文件夹名稱。 
    -s 设定密码 密码必须使用双引号括起来。
    例如:-s "Secret Password",不过要注意大小写是不同的! 
    -hs   包含符合条件的隐藏及系统文件。 filename.zip 压缩文件名
    指定压缩后的文件名,要注意的是必须是全路径文件名 (含磁碟機代号及文件夹)。directory 文件夹
    解压缩后的文件存放的文件夹。如果文件夹不存在便会自动建立。
    注意事项:※非常重要:永远使用全路径文件名 。
    ※若希望执行 Winzip 时是最小化,要使用 -min 这个参数,它必须是命令列参数的第一个参数。
    ※Winzip 內建只支援 zip 及 unzip 二种操作模式。
    ※若是長文件名的话,必须使用双引号括起来。
    ※在设定文件时,前面及最后的字元不可空白,也不可有空白行!
    ※在命令列中的方法及选项参数,至少要用一个以上的空白分隔。※WinZip 可以用来配合 cc:Mail 压缩文件:
    更改 WMAIL.INI 中的 [cc:Mail] section 的 compress= 这一行
    指定 Winzip 的完整路径,并跟随着 "-a %1 @%2" 参数
    例如:如果 Winzip 安装在 c:\winzip,則 compress= 这一行必须改成
    compress=c:\winzip\winzip.exe -a %1 @%2
    示例:
    Private Sub Command1_Click()
    Dim wzipexe As String ' winzip 执行文件的位置
    Dim wsource As String ' 原始文件 (压缩前)
    Dim wtarget As String ' 目地文件 (压缩后)
    Dim wcmd As String ' Shell 指令
    Dim retval As Double ' Shell 指令传回值' Shell 指令
    wzipexe = "C:\program files\winzip\WINzip32" ' winzip 执行文件的位置
    wtarget = "d:\1.zip" ' 原始文件 (压缩前)
    wsource = "d:\1.mbd" ' 目地文件 (压缩后)
    wcmd = wzipexe & " -a " & wtarget & " " & wsource ' Shell 指令
    retval = Shell(wcmd, 6) ' Shell 指令传回值
    '上面的一大串可写成
    'retval = Shell("C:\program files\winzip\WINzip32 -a _
    'd:\1.zip d:\1.mdb", 6)
    End Sub