After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764539 - msiextract list files but don't extract
msiextract list files but don't extract
Status: RESOLVED FIXED
Product: msitools
Classification: Other
Component: tools
0.95
Other Linux
: Normal normal
: 1.0
Assigned To: msitools maintainer(s)
msitools maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-04-03 13:26 UTC by lerieur
Modified: 2016-10-05 07:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
msiextract: handle out-of-msi cab extraction (2.47 KB, patch)
2016-09-30 08:44 UTC, Marc-Andre Lureau
none Details | Review
msiextract: external cab handling patch proposal (3.88 KB, patch)
2016-10-04 20:19 UTC, j_chrtn
none Details | Review
msiextract: external cab handling (3.95 KB, patch)
2016-10-05 06:59 UTC, Marc-Andre Lureau
committed Details | Review

Description lerieur 2016-04-03 13:26:23 UTC
msiextract list files but don't extract msi file from LeagueofLegends game installer

Dependencies:
- wine 1.9.7
- msitools 0.95

OS: ArchLinux

Steps to reproduce:

$ wget https://riotgamespatcher-a.akamaihd.net/ShellInstaller/EUW/LeagueofLegends_EUW_Installer_9_15_2014.exe
$ wine LeagueofLegends_EUW_Installer_9_15_2014.exe /extract
$ ls
Aug2008_d3dx10_39_x86.cab
Aug2008_d3dx9_39_x86.cab
Aug2008_XAudio_x86.cab
disk1.cab
dsetup32.dll
DSETUP.dll
dxdllreg_x86.cab
dxnt.cab
DXSETUP.exe
dxupdate.cab
LeagueofLegends_EUW_Installer_9_15_2014.exe
LoL.EUW.msi
vcredist_x64.exe
vcredist_x86.exe

$ msiextract -l LoL.EUW.msi
APPDIR:./RADS/system/launcher.cfg
APPDIR:./RADS/system/lol.ico
APPDIR:./RADS/system/rads_user_kernel.exe
APPDIR:./RADS/system/locale.cfg
APPDIR:./lol.launcher.admin.exe
APPDIR:./lol.launcher.exe
APPDIR:./RADS/system/system.cfg
APPDIR:./RADS/system/user.cfg
$ msiextract LoL.EUW.msi
$ ls
Aug2008_d3dx10_39_x86.cab
Aug2008_d3dx9_39_x86.cab
Aug2008_XAudio_x86.cab
disk1.cab
dsetup32.dll
DSETUP.dll
dxdllreg_x86.cab
dxnt.cab
DXSETUP.exe
dxupdate.cab
LeagueofLegends_EUW_Installer_9_15_2014.exe
LoL.EUW.msi
vcredist_x64.exe
vcredist_x86.exe
Comment 1 lerieur 2016-04-03 21:15:56 UTC
Extraction works with lessmsi through Wine: http://lessmsi.activescott.com/ https://github.com/activescott/lessmsi
$ wine lessmsi.exe x LoL.EUW.msi
$ find LoL.EUW
LoL.EUW
LoL.EUW/SourceDir
LoL.EUW/SourceDir/APPDIR
LoL.EUW/SourceDir/APPDIR/lol.launcher.exe
LoL.EUW/SourceDir/APPDIR/RADS
LoL.EUW/SourceDir/APPDIR/RADS/system
LoL.EUW/SourceDir/APPDIR/RADS/system/launcher.cfg
LoL.EUW/SourceDir/APPDIR/RADS/system/locale.cfg
LoL.EUW/SourceDir/APPDIR/RADS/system/lol.ico
LoL.EUW/SourceDir/APPDIR/RADS/system/rads_user_kernel.exe
LoL.EUW/SourceDir/APPDIR/RADS/system/system.cfg
LoL.EUW/SourceDir/APPDIR/RADS/system/user.cfg
LoL.EUW/SourceDir/APPDIR/lol.launcher.admin.exe
Comment 2 j_chrtn 2016-09-29 15:33:32 UTC
Hi,

I believe the problem is that msiextract does not handle MSI files that use external .cab.

Let me explain:

msiinfo export LoL.EUW.msi Media outputs this:
DiskId  LastSequence    DiskPrompt      Cabinet VolumeLabel     Source
i2      i4      L64     S255    S32     S32
Media   DiskId
1       8       Disk1   disk1.cab       Disk1

As you can see the cab file is not preceded by a # sign meaning disk1.cab is not a data stream inside the MSI.

Now, if you take a look at msiextract.vala code, the first line of extract_cab function is  "if (cab.has_prefix ("#")) {" but there is no else statement to handle external cabinet.

msiextract -l works because it does not require the .cab file to list files. The File and Directory tables are enough for this task.

Best regards.
Comment 3 Marc-Andre Lureau 2016-09-30 08:44:07 UTC
Created attachment 336618 [details] [review]
msiextract: handle out-of-msi cab extraction

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Comment 4 Marc-Andre Lureau 2016-09-30 08:44:55 UTC
could someone try this patch? I have no msi with out-of-cab, and my wine installation refuses to run 32-bit apps (even with WINEARCH)

Thanks
Comment 5 j_chrtn 2016-10-04 20:19:50 UTC
Created attachment 336948 [details] [review]
msiextract: external cab handling patch proposal

Improved version of Marc André proposed patch.
This patch looks for the cab file (case insensitive search) in the folder the MSI file resides in.

Tested with EnterpriseWW.msi from MS Office Enterprise 2007.

Jean-Louis Charton
Comment 6 Marc-Andre Lureau 2016-10-05 06:59:24 UTC
The following fix has been pushed:
368ed6f msiextract: external cab handling
Comment 7 Marc-Andre Lureau 2016-10-05 06:59:31 UTC
Created attachment 336964 [details] [review]
msiextract: external cab handling

Improved version of Marc André proposed patch.
This patch looks for the cab file (case insensitive search) in the folder the MSI file resides in.

Tested with EnterpriseWW.msi from MS Office Enterprise 2007.

Fixes:
https://bugzilla.gnome.org/show_bug.cgi?id=764539

Signed-off-by: Jean-Louis Charton <j_chrtn@yahoo.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Comment 8 Marc-Andre Lureau 2016-10-05 07:00:35 UTC
thank you Jean-Louis