I'm having trouble extracting the CAB files I get from Microsoft Windows Server Update Services. If I extract them with 7z, I get basically the same result as extracting them with Microsofts "expand" command, but the most important parts are missing, while MS "expand" expands this correctly and completely. The parts that seem to be incomplete with 7z are in subdirs when MS "expand" is used.
Example-File:
B8CEC590CCF1EBC057969C1C760BA290E38FC801.cab
You might say why don't I just use expand then instead? Well, the reason is, I need to extract the files under Unix. However this problem is reproducible on Windows and Unix.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I unpacked B8CEC590CCF1EBC057969C1C760BA290E38FC801.cab with expand and with 7z into two different target directories. I repacked those directories afterwards with 7z and uploaded them, so you can easily see the difference. It's much the same as stated on MS technet explanation:
If you do not use a compression tool that supports IPD to extract the update, the extracted files will look similar to the following output:
As we can see, this article on the Internet was published only in 2021. I didn't know about this compression algorithm myself before. But it compresses very effectively by the way. Therefore, I easily rewrote this code to Visual Basic, event here: https://www.cyberforum.ru/visual-basic/thread704248-page18.html#post17437738
The binary data signature starts with PA30. This is a light and simple code, as you can see.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since 7-zip is not aiming at being x-platform, then it perhaps is not prohibitively hard, it only would take to research which MS API to use. Projects like p7zip would have hard time, unless WinE HQ reversed and implemented IPD (hardly so).
https://www.raxsoft.com/raxccm/software.php - here is binary implementation of IPD unpacking, sadly there is e-mail but no sources, one could read to easily grasp MS API calls sequence for unpacking.
This is a totally different msdelta feature. It uses cab packaging format but have no relation with cab.
expand.exe uses BOTH cab and msdelta while 7z only support cab but not msdelta.
Igor have 2 options:
(1) detect msdelta while opening CAB files.
(1.1) and unpack it using win32api.
(1.2) and implement a msdelta (from/into wine) algorithm from scratch.
(2) do nothing.
Last edit: Linda 2018-02-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having trouble extracting the CAB files I get from Microsoft Windows Server Update Services. If I extract them with 7z, I get basically the same result as extracting them with Microsofts "expand" command, but the most important parts are missing, while MS "expand" expands this correctly and completely. The parts that seem to be incomplete with 7z are in subdirs when MS "expand" is used.
Example-File:
B8CEC590CCF1EBC057969C1C760BA290E38FC801.cab
You might say why don't I just use expand then instead? Well, the reason is, I need to extract the files under Unix. However this problem is reproducible on Windows and Unix.
I need the link to such CAB file to test it.
And check 7-Zip 9.22 beta also.
Here you are:
http://www.file-upload.net/download-4061277/B8CEC590CCF1EBC057969C1C760BA290E38FC801.cab.html
Try to unpack with expand (must be Windows7, Windows 2008 or Vista, must NOT be XP version of expand!) and compare with 7z unpacking results.
I don't see any difference.
maybe my exapnd is old.
Show what the difference do you see.
what exact sizes and names of addiitional files.
Check also that you use latest 7-Zip 9.20.
Tried 7z V9.20 and V9.22-beta. Results are the same.
If you cannot reproduce it, you're probably still using an old version of expand. See this article:
http://technet.microsoft.com/en-us/library/dd744339(WS.10).aspx
I think that 7z does not support IPD compression technology.
I unpacked B8CEC590CCF1EBC057969C1C760BA290E38FC801.cab with expand and with 7z into two different target directories. I repacked those directories afterwards with 7z and uploaded them, so you can easily see the difference. It's much the same as stated on MS technet explanation:
_manifest_.cix.xml
0
1
2
…
Here are the two files:
http://www.file-upload.net/download-4061364/B8CEC590CCF1EBC057969C1C760BA290E38FC801-7z.zip.html
http://www.file-upload.net/download-4061366/B8CEC590CCF1EBC057969C1C760BA290E38FC801-MS-expand.zip.html
I didn't know about that new feature of CAB.
I'll check it later. Thanks!
Any news on this one? Do you plan to implement IPD compatible extraction?
That IPD feature is not so simple to implement.
Now I don't want to spend time for that feature.
Maybe later I'll try.
Still no plans to support the extracting of CAB files?
I found the 18.00 ist out. Did you adress the issue (IPD feature) we discussed a couple of years ago somewhere between 9.22 and 18.00?
No. I don't know details about IPD. I suppose it's difficult to implement it now.
Probably for many years there was no such code on the Internet for unpacking msdelta (PA30). But now there is already such a code on the Internet. I wrote a module for myself, even in visual basic, very light code by the way. This is where I originally came across this article: https://www.manhunter.ru/assembler/1620_upakovka_i_raspakovka_dannih_s_pomoschyu_delta_funkciy.html
As we can see, this article on the Internet was published only in 2021. I didn't know about this compression algorithm myself before. But it compresses very effectively by the way. Therefore, I easily rewrote this code to Visual Basic, event here: https://www.cyberforum.ru/visual-basic/thread704248-page18.html#post17437738
The binary data signature starts with PA30. This is a light and simple code, as you can see.
Since 7-zip is not aiming at being x-platform, then it perhaps is not prohibitively hard, it only would take to research which MS API to use. Projects like p7zip would have hard time, unless WinE HQ reversed and implemented IPD (hardly so).
See the following topic, especially last messages.
https://msfn.org/board/topic/171184-microsoft-ipd-intra-package-delta-compression-tool/?page=2
https://www.raxsoft.com/raxccm/software.php - here is binary implementation of IPD unpacking, sadly there is e-mail but no sources, one could read to easily grasp MS API calls sequence for unpacking.
PS. Some very trivial trivia for easy reference
https://reverseengineering.stackexchange.com/questions/6228/how-do-the-internals-of-a-windows-update-security-patch-work
Last edit: Burov Dmitry 2018-02-17
This is a totally different msdelta feature. It uses cab packaging format but have no relation with cab.
expand.exe uses BOTH cab and msdelta while 7z only support cab but not msdelta.
Igor have 2 options:
(1) detect msdelta while opening CAB files.
(1.1) and unpack it using win32api.
(1.2) and implement a msdelta (from/into wine) algorithm from scratch.
(2) do nothing.
Last edit: Linda 2018-02-19