From: mayayana on 24 Jan 2007 10:40 I'm wondering if anyone has the definitive skinny on CAB files. I started out to make a small utility that extracts from CABs, but I've had mixed results. As near as I can tell: * There are DOS command-line EXEs but they're limited and not installed everywhere. * There's cabinet.dll but the calls are all cdecl and I'm not experienced enough with C++ and typelibs to try Matthew Curland's cdecl-in-VB methods. * There's SetupIterateCabinet, which works well except that it only works on a very limited number of CABs. I don't know what the problem is - and I can't find the culprit in the CAB header - but SetupIterateCabinet fails more often than not with an error 13 (invalid data) during extraction attempts. (And the official MS page about it says that it's faulty by design because it's "not intended" to be used for anything but one's own setup CABs made with MAKECAB.) * I'm considering trying to just parse the CAB file directly, which seems to be a realistic ambition. Then I could decompress the files myself with zlib functions. As I understand it, CABs use zlib compression, but I'm not clear about that. The section of the header that indicates compression type can vary, it seems, and the MS docs are hazy about the details of whether a basic deflate method, like that found in zlibwapi.dll, can alwys be dependably used to decompress files from CABs.
From: Ulrich Korndoerfer on 24 Jan 2007 13:08 Hi, mayayana schrieb: 7-Zip is an excellent open source zip utility, usable as a command line exe or with windows GUI. It handles, besides CAB files, many more other archive formats. -- Ulrich Korndoerfer VB tips, helpers, solutions -> http://www.proSource.de/Downloads/ ----------------------------------------------------------------------- Plea for a bright future for VB classic. Sign the petition to Microsoft: -> http://classicvb.org/petition/ -----------------------------------------------------------------------
From: mayayana on 24 Jan 2007 17:54 > 7-Zip is an excellent open source zip utility, usable as a command line > exe or with windows GUI. It handles, besides CAB files, many more other > archive formats. > > I have 7-zip. I also have Power Archiver which has good commandline options. But I was hoping to come up with VB code. The reason: I wrote an MSI unpacker as an HTA with VBScript awhile back. It's quite popular, but it requires calling a zip program command line to unpack the MSI CAB file. I wanted to eliminate that need in order to accomodate people who might just find it too daunting to be editing VBScript. As it stands now, I have SetupIterateCabinet working fine on some CABs. But it appears to be an issue of SetupIterateCabinet working only with MSZIP compression, while some CABs now use LZX compression. I figured that if I can work this out it will also benefit others, since VB, at this point, has no good way to deal with CABs.
From: Bob O`Bob on 24 Jan 2007 19:48 mayayana wrote: > * There's cabinet.dll but the calls are all cdecl and > I'm not experienced enough with C++ and typelibs > to try Matthew Curland's cdecl-in-VB methods. My advice would be to study it for a while and see if you can overcome that limitation. At least that way you'd be in control of the whole process. Bob --
From: Ulrich Korndoerfer on 24 Jan 2007 21:02
Hi, mayayana schrieb: >> 7-Zip is an excellent open source zip utility, usable as a command line >> exe or with windows GUI. It handles, besides CAB files, many more other >> archive formats. >> >> > I have 7-zip. I also have Power Archiver which has > good commandline options. But I was hoping to > come up with VB code. sorry, from your writings I thought you were searching for an unzipper command line utility. -- Ulrich Korndoerfer VB tips, helpers, solutions -> http://www.proSource.de/Downloads/ ----------------------------------------------------------------------- Plea for a bright future for VB classic. Sign the petition to Microsoft: -> http://classicvb.org/petition/ ----------------------------------------------------------------------- |