lessmsi icon indicating copy to clipboard operation
lessmsi copied to clipboard

Cannot extract cab from InstallShield msi's (Extract failed: Failed to close cab extract object, errror: 2)

Open activescott opened this issue 10 years ago • 2 comments

from https://code.google.com/p/lessmsi/issues/detail?id=27

Reported by alibhai.ashiq, Sep 11, 2012 I have an MSI-based InstallShield 10 MSI that I want to extract the files from. I can view the files in the LessMSI application, but when I attempt to extract them, I get this error:

Error: System.Runtime.InteropServices.COMException (0x00000002): Failed to close cab extract object, error: 2 at Microsoft.Tools.WindowsInstallerXml.Cab.WixExtractCab.Close() at LessMsi.Msi.Wixtracts.ExplodeAllMediaCabs(Database msidb, DirectoryInfo baseOutputPath) at LessMsi.Msi.Wixtracts.ExtractFiles(FileInfo msi, DirectoryInfo outputDir, MsiFile[] filesToExtract, AsyncCallback progressCallback) at LessMsi.Program.DoExtraction(String msiFileName, String outDirName) at LessMsi.Program.Main(String[] argStrings)

I cannot provide a file (employer's IP), but I am very keen to resolve this. Jan 27, 2013 Delete comment Project Member #1 activescott Installshield uses a proprietary cab format. No easy way to deal with this. There is an open source library (mentioned in the libmspack source code AFAIR) that maybe could help but will require quite a bit of effort. Labels: -Priority-Medium Priority-Low Jan 27, 2013 Delete comment Project Member #2 activescott Could at least improve the error message. I know I can detect these cabs now using libmspack. Summary: Cannot extract cab from InstallShield msi's (Extract failed: Failed to close cab extract object, errror: 2) (was: Extract failed: Failed to close cab extract object, errror: 2) Aug 1, 2013 Delete comment Project Member #3 activescott Can someone attach an installshield msi here and I'll try to at least improve the error message by detecting installshield's cabs and writing out an informative error. Status: Accepted

activescott avatar Aug 09 '13 07:08 activescott

The least it could do is detect installshield MSIs and display an actionable error message to the user. As a follow-up issue we could investigate implementing installshield extraction support.

activescott avatar Sep 19 '14 04:09 activescott

Maybe this lib can actually allow extracting files from cabs in installshield installers: https://github.com/twogood/unshield

activescott avatar Nov 25 '18 06:11 activescott