akaladis Veteran Posted June 28, 2004 Veteran Share Posted June 28, 2004 I've looked pretty much everywhere, but still cant find a solution. I need to extract a file from a self-extracting MS Cabinet file through VB6 but nothing seems to work? Any ideas? Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted June 28, 2004 Share Posted June 28, 2004 You could use the expand system command. Just ShellExecute it. Link to comment Share on other sites More sharing options...
0 akaladis Veteran Posted June 28, 2004 Author Veteran Share Posted June 28, 2004 no, that wont work on a sfx cab file... it works for normal cab files, but not sfx ones, since they got an 'extra' header before the CAB header... Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted June 28, 2004 Share Posted June 28, 2004 sorry, missed the self-extracting bit. http://support.microsoft.com/default.aspx?kbid=310618 Link to comment Share on other sites More sharing options...
0 akaladis Veteran Posted June 28, 2004 Author Veteran Share Posted June 28, 2004 still though, that SDK wont accept sfx files... also tried WinZip Commandline and WinRAR commandline but they dont like sfx cab either... its weird since both can open the .exe file right away... Link to comment Share on other sites More sharing options...
0 XPGoD Posted June 28, 2004 Share Posted June 28, 2004 Have you tried i6comp.exe? The command to extract like a file named....345.dat from say data1.cab would be i6comp e data1.cab 345.dat then to put back i6comp r data1.cab 345.dat You must place i6comp in the dir of the cab, open cmd and then execute. I and many others have used this on the install material for Audigy disc software suite. I am not aware in the very least if this adds up to your scenario, but oddly the MSI file on setup is required to start install for the Audigy stuff, and I'm assuming that it uses some sort of VB to run. Also, winzip or winrar command line or not will not touch these cab files for the audigy stuff. Gives an error, saying something regarding something something ended prior to when it should have ......bah... Anyway here is the link to i6comp http://hobbes.nmsu.edu/cgi-bin/h-viewer?sh.../i6comp103b.zip (You will need DLL from this file)ZD51145.DLL and get this main one (included s0urce C0d3) http://hobbes.nmsu.edu/cgi-bin/h-viewer?sh...2/i6comp020.zip the file is located in the Release folder. Hope that helps XP GOD.....out Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted June 28, 2004 Share Posted June 28, 2004 (edited) Geez, I'm batting 1000 today. I could have sworn that I read the -x switch on extract.exe ( which there isn't an -x switch ) would handle sfx files. Doh! [edit] Looking at an sfx and looking at the CAB file format, it wouldn't be hard to write a tool or library to do the extraction with that SDK. Time is my only issue, otherwise, I'd do it. It would be a fun exercise. Edited June 28, 2004 by weenur Link to comment Share on other sites More sharing options...
0 akaladis Veteran Posted June 29, 2004 Author Veteran Share Posted June 29, 2004 yes i have come this close: convert the exe to a cab (remove the initial header before 4D53434600000000 appears in HEX) and then extract it... but doing that on a >200 mb files can take some while... so im looking for a way to directly extract a file off of the SFX... just ignore the first header and treat the rest as the CAB file... but i would need to get much info on how to handle CAB files natively... Link to comment Share on other sites More sharing options...
0 akaladis Veteran Posted June 29, 2004 Author Veteran Share Posted June 29, 2004 Have you tried i6comp.exe?The command to extract like a file named....345.dat from say data1.cab would be i6comp e data1.cab 345.dat then to put back i6comp r data1.cab 345.dat You must place i6comp in the dir of the cab, open cmd and then execute. I and many others have used this on the install material for Audigy disc software suite. I am not aware in the very least if this adds up to your scenario, but oddly the MSI file on setup is required to start install for the Audigy stuff, and I'm assuming that it uses some sort of VB to run. Also, winzip or winrar command line or not will not touch these cab files for the audigy stuff. Gives an error, saying something regarding something something ended prior to when it should have ......bah... Anyway here is the link to i6comp http://hobbes.nmsu.edu/cgi-bin/h-viewer?sh.../i6comp103b.zip (You will need DLL from this file)ZD51145.DLL and get this main one (included s0urce C0d3) http://hobbes.nmsu.edu/cgi-bin/h-viewer?sh...2/i6comp020.zip the file is located in the Release folder. Hope that helps XP GOD.....out Thats for InstallShield 6 CAB files (not MS CABs)... they got some humor though... ─════════════════════════════════════════════════════════─■InstallShield 5.x Cabinet Compression & Maintenance Util■ ■Version 2.00 -]fOSSiL - 2000 [- ■ ■InstallShield 6.x Cabinet Compression & Maintenance Util■ ■Version 1.03b -] Morlac - 2000 [- ■ ─════════════════════════════════════════════════════════─ This does not look like IShield 6 cab =) Are u sure u know what u are doing ? LOL Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted June 29, 2004 Share Posted June 29, 2004 yes i have come this close: convert the exe to a cab (remove the initial header before 4D53434600000000 appears in HEX) and then extract it... but doing that on a >200 mb files can take some while... so im looking for a way to directly extract a file off of the SFX... just ignore the first header and treat the rest as the CAB file... but i would need to get much info on how to handle CAB files natively... That is what the CAB SDK is for. Compressing and Decompressing CAB files. Link to comment Share on other sites More sharing options...
0 akaladis Veteran Posted June 29, 2004 Author Veteran Share Posted June 29, 2004 the CAB SDK wont let you extract DIRECTLY a file from a SFX CAB... if i first convert it from exe to cab (cut the SFX header) then sure, i can use either the SDK or expand command... Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted June 29, 2004 Share Posted June 29, 2004 That's what I meant. You could easily ignore the exe crap and just enumerate the files in the cab, figure out the offsets, and decompress them. Link to comment Share on other sites More sharing options...
0 u.jerks Posted July 5, 2004 Share Posted July 5, 2004 ... but doing that on a >200 mb files can take some while... Removing the header will be the best possible way.. unless you find the decompression algorithm and modify it so it can bypass the sfx header. Since you will only need to remove the header i don't think it will take much doing so. just temporarily remove the header from the sfx file, use the expand system command then add the header back to the file. Link to comment Share on other sites More sharing options...
0 MasterSpy Posted July 5, 2004 Share Posted July 5, 2004 Check http://www.planet-source-code.com/ as they will probably have what your looking for... somewhere in their millions of lines of vb code. Master Spy. Link to comment Share on other sites More sharing options...
Question
akaladis Veteran
I've looked pretty much everywhere, but still cant find a solution. I need to extract a file from a self-extracting MS Cabinet file through VB6 but nothing seems to work? Any ideas?
Link to comment
Share on other sites
13 answers to this question
Recommended Posts