在asp.net的后台程序的一个button_click事件中调用winzip压缩文件夹,不成功,程序如下:
Dim WshShell As Object
Dim IsSuccess As Integer   
WshShell = CreateObject("Wscript.Shell")          
IsSuccess = WshShell.Run("C:\WinZip\WINZIP32.EXE -a D:\temp.zip D:\abc", AppWinStyle.Hide)  --执行这条语句的时候提示错误:系统找不到指定的文件。
文件的路径没有什么错误。
--C:\WinZip\WINZIP32.EXE:是winzip的安装路径
--D:\abc:要压缩的原始文件夹
--D:\temp.zip:要生成的压缩文件请诸位大虾指点迷经,很急!

解决方案 »

  1.   

    网上有一个.net版的zip类库,添加到工程中,就可以用那个压缩解压缩文件
      

  2.   

    SharpZipLib是一个很好用的open source的库
      

  3.   

    用SharpZipLib很方便,可以压缩成zip文件。
      

  4.   

    string Strdir = DirectoryName;//要压缩的文件夹
    string StrdirGoal = Strdir + "\\" + "exam";//压缩包存放位置
    string StrCmd = "a " + " -ep1 -sfx " + StrdirGoal + " " + Strdir;
    string StrRARCmd = Server.MapPath( "" ) + "\\Rar\\Rar.exe ";
    Process.Start( StrRARCmd, StrCmd );
    你把压缩文件考到wwwroot....
    只需要四个文件就可以了
    而且可以压缩文件夹,自动解压。等等。
      

  5.   

    Default.SFX,Dos.SFX,Rar.exe,RarExt.dll,Zip.SFX
    拷备到你的项目中rar文件
    具体压缩方式可以看帮助文件
    string Strdir = DirectoryName;//要压缩的文件夹
    string StrdirGoal = Strdir + "\\" + "exam";//压缩包存放位置和名称
      

  6.   

    我的博客有篇文章《使用SharpZip压缩与解压缩的实战经验》,文中有詳細介紹
    不過,示例代碼是用 C# 寫的http://blog.csdn.net/cityhunter172/
      

  7.   

    看看这个
    http://dev.csdn.net/article/70916.shtm
      

  8.   

    http://blog.csdn.net/johnsuna/archive/2006/05/11/724833.aspx
      

  9.   

    找一个你喜欢的Zip库吧。反正Zip的算法是公开的,不像Rar,任何人都可以写Zip的类库,你喜欢也可以自己写一个,不喜欢就挑一个你觉得好的来用就行了,没必要调用Winzip。