Discussion:
Internal CABS in transforms
(too old to reply)
EdT
2005-04-29 08:00:25 UTC
Permalink
We have an MSI that installs an app which includes a text configuration
file. For testing, we needed a different version of the text
configuration file, so a transform was created which deploys this
modified file. The transform included an external CAB file.

Now we wanted to make the CAB file internal, but this has so far
defeated us.

I have tried this using Wise Package Studio and latterly with ORCA and
also get the same error - 2356 Couldn't locate cabinet in stream: [2].

Here is what I've done:

Opened the MSI and MST in ORCA - the file table correctly shows the
existing text file as deleted, and a new one added. The sequence number
of the new file is the next available. The MSIFileHash table also shows
the original text file entry as deleted and a new entry present for the
new text file.

I have then imported the external CAB file into the CABs table (this
increases the .MST file size by the correct amount), and modified the
media table to point to the now internal CAB file, by changing the
cabinet column entry to #Cabs.w2.cab which matches the name of the
added internal cab file.

Validation throws up no errors.

However, installation still throws the 2356 error. For some reason it
cannot find the cab in the stream.

I exported all the tables from the MSI/MST combination using ORCA, and
the CAB table content includes the w1.cab.ibd and w2.cab.ibd files as
expected. Opening the files in winzip shows that the content is
correct.

So I'm now wondering if there is something amiss in the CAB file
itself. I know that the order of files in the CAB must match the
sequence order in the file table, and this is certainly OK in w1.cab,
but maybe w2.cab (originally created by WPS) has something not quite
right internally.
So I checked the CAB file in a hex editor against the specifications
given in the CAB SDK from Microsoft, and all appeared to be OK
I then had a thought - I opened the MSI and MST( with the internal cab)
in ORCA and saved the combination back to a single MSI. This installed
flawlessly.

So it now seems that the windows installer engine is somehow not able
to treat the MSI and MST cab streams as a single stream at install
time.

The SDK help file is not that clear on whether internal CABS are
permitted in transforms, but I am mindful that ORCA does allow you to
import the CAB into the transform.

Can anyone shed any light on this issue? Is it a bug in the windows
installer engine or have I missed some aspect of the media table which
needs to indicate that the cab is in the MST stream and not the MSI
stream (assuming there is a distinction at all)
By the way, I am running XP SP2 with the 3.0 installer.

Thanks
Ed Tippelt
EdT
2005-05-04 11:26:38 UTC
Permalink
Anyone from MSFT care to comment? Would really appreciate an answer on
this one!
cb
2005-05-04 13:27:36 UTC
Permalink
transforms can only change Tables

cab files go into a stream that is not a table

you will have to use an external cab or stream the cab into the MSI

cb
Post by EdT
We have an MSI that installs an app which includes a text configuration
file. For testing, we needed a different version of the text
configuration file, so a transform was created which deploys this
modified file. The transform included an external CAB file.
Now we wanted to make the CAB file internal, but this has so far
defeated us.
I have tried this using Wise Package Studio and latterly with ORCA and
also get the same error - 2356 Couldn't locate cabinet in stream: [2].
Opened the MSI and MST in ORCA - the file table correctly shows the
existing text file as deleted, and a new one added. The sequence number
of the new file is the next available. The MSIFileHash table also shows
the original text file entry as deleted and a new entry present for the
new text file.
I have then imported the external CAB file into the CABs table (this
increases the .MST file size by the correct amount), and modified the
media table to point to the now internal CAB file, by changing the
cabinet column entry to #Cabs.w2.cab which matches the name of the
added internal cab file.
Validation throws up no errors.
However, installation still throws the 2356 error. For some reason it
cannot find the cab in the stream.
I exported all the tables from the MSI/MST combination using ORCA, and
the CAB table content includes the w1.cab.ibd and w2.cab.ibd files as
expected. Opening the files in winzip shows that the content is
correct.
So I'm now wondering if there is something amiss in the CAB file
itself. I know that the order of files in the CAB must match the
sequence order in the file table, and this is certainly OK in w1.cab,
but maybe w2.cab (originally created by WPS) has something not quite
right internally.
So I checked the CAB file in a hex editor against the specifications
given in the CAB SDK from Microsoft, and all appeared to be OK
I then had a thought - I opened the MSI and MST( with the internal cab)
in ORCA and saved the combination back to a single MSI. This installed
flawlessly.
So it now seems that the windows installer engine is somehow not able
to treat the MSI and MST cab streams as a single stream at install
time.
The SDK help file is not that clear on whether internal CABS are
permitted in transforms, but I am mindful that ORCA does allow you to
import the CAB into the transform.
Can anyone shed any light on this issue? Is it a bug in the windows
installer engine or have I missed some aspect of the media table which
needs to indicate that the cab is in the MST stream and not the MSI
stream (assuming there is a distinction at all)
By the way, I am running XP SP2 with the 3.0 installer.
Thanks
Ed Tippelt
EdT
2005-05-05 11:25:02 UTC
Permalink
Then there is a bug in both ORCA V3 and MSITRAN.EXE which Microsoft
need to fix.

ORCA allows you to import a cab into a transform's CAB table and save
it.
If you edit an existing MSI to add another internal CAB and then run
MSITRAN to create a transform from the original, then the transform
created by MSITRAN has the CAB embedded in the CAB stream of the
transform.
So if all Microsoft tools support it, but it doesn't work, then there
is a bug somewhere, in my humble opinion....

EdT
Post by cb
transforms can only change Tables
cab files go into a stream that is not a table
you will have to use an external cab or stream the cab into the MSI
cb
Post by EdT
We have an MSI that installs an app which includes a text
configuration
Post by cb
Post by EdT
file. For testing, we needed a different version of the text
configuration file, so a transform was created which deploys this
modified file. The transform included an external CAB file.
Now we wanted to make the CAB file internal, but this has so far
defeated us.
I have tried this using Wise Package Studio and latterly with ORCA and
also get the same error - 2356 Couldn't locate cabinet in stream: [2].
Opened the MSI and MST in ORCA - the file table correctly shows the
existing text file as deleted, and a new one added. The sequence number
of the new file is the next available. The MSIFileHash table also shows
the original text file entry as deleted and a new entry present for the
new text file.
I have then imported the external CAB file into the CABs table (this
increases the .MST file size by the correct amount), and modified the
media table to point to the now internal CAB file, by changing the
cabinet column entry to #Cabs.w2.cab which matches the name of the
added internal cab file.
Validation throws up no errors.
However, installation still throws the 2356 error. For some reason it
cannot find the cab in the stream.
I exported all the tables from the MSI/MST combination using ORCA, and
the CAB table content includes the w1.cab.ibd and w2.cab.ibd files as
expected. Opening the files in winzip shows that the content is
correct.
So I'm now wondering if there is something amiss in the CAB file
itself. I know that the order of files in the CAB must match the
sequence order in the file table, and this is certainly OK in w1.cab,
but maybe w2.cab (originally created by WPS) has something not quite
right internally.
So I checked the CAB file in a hex editor against the
specifications
Post by cb
Post by EdT
given in the CAB SDK from Microsoft, and all appeared to be OK
I then had a thought - I opened the MSI and MST( with the internal cab)
in ORCA and saved the combination back to a single MSI. This
installed
Post by cb
Post by EdT
flawlessly.
So it now seems that the windows installer engine is somehow not able
to treat the MSI and MST cab streams as a single stream at install
time.
The SDK help file is not that clear on whether internal CABS are
permitted in transforms, but I am mindful that ORCA does allow you to
import the CAB into the transform.
Can anyone shed any light on this issue? Is it a bug in the windows
installer engine or have I missed some aspect of the media table which
needs to indicate that the cab is in the MST stream and not the MSI
stream (assuming there is a distinction at all)
By the way, I am running XP SP2 with the 3.0 installer.
Thanks
Ed Tippelt
Loading...