There are a few threads around the net about this issue but none of them were able to provide me with an answer that worked. I'm trying to execute the following commands in VBscript:
set zip = CreateObject("Ionic.Zip.ZipFile")
Doing so throws the error shown above in the discussion title. Initially I downloaded "DotNetZipLib-DevKit-v1.9.zip" and copied the "Ionic.Zip.Dll" from the "Release" folder to my own folder where I used gacutil and regasm
according to the instructions in the COM section of the documentation. That did not work so I downloaded "DotNetZip-Runtime-v1.9.msi" and installed it. The result was the same error as before. Since then I have tried unregistering
my first attempt, uninstalling the second attempt and reinstalling the msi file again. Still no luck. One other thread said to make sure there were no spaces in the path to the DLL so I copied it from where the msi file installed it and registered
it there but got the same result. Finally another thread said to run regasm with the "/codebase" flag so I tried that but still had the same problem. I haven't had any errors registering it, everything seems like it's fine until I try
to run the code above.
OS: Windows Server 2008 R2 Datacenter Edition
Windows 7 SDK
SQL Server 2008 R2
Please help. I'm at a loss and would really like to use your software to assist in my server's back end processes.
Nov 7, 2011 at 4:25 PM
This problem can be due to any number of issues. The problem may be due to something to do with dotNetZip, something to do with .NET, or something to do with security or access.
I'm not an expert on .NET-com objects, so I cannot provide a detailed walkthrough of how to track down and diagnose all the possible causes. But I would suggest that you consult the web for some other resources on creating .NET-based ActiveX objects, independent
Though I can't provide a detailed, complete walkthrough, I can provide some hints. This is what I would try:
with the Err object. Err.Number will give you the HRESULT. Other COM languages have other mechanisms. That HRESULT will give you a hint as to the cause of the error.
- Verify that you can use the DotNetZip assembly from a pure .NET program. This eliminates the COM code path and verifies that the .NET piece is functional and works properly. For example it will verify that the required .NET runtime is available on
the machine. It will verify that the DLL is readable and not corrupted.