Replace File in Cab File
I need to replace a file in an MST that is located in a Data1 cab file. Is there anyway possible to place the updated file in the Data1 or will it have to go into a new cab file?
Thanks
Thanks
0 Comments
[ + ] Show comments
Answers (7)
Please log in to answer
Posted by:
anonymous_9363
17 years ago
Posted by:
gizsha
17 years ago
This link might help too.
Look at Makecab.exe
http://support.microsoft.com/kb/198038
You can find the Makecab.exe in the SDK that VBscab is referring to.
~Gizsha
Look at Makecab.exe
http://support.microsoft.com/kb/198038
You can find the Makecab.exe in the SDK that VBscab is referring to.
~Gizsha
Posted by:
nheim
17 years ago
Hi Scott,
it is not possible to alter a CAB-file with an MST.
The easiest approach is to build a new CAB-file with the changed file in it.
See this thread: http://itninja.com/question/how-do-you-roll-out-new-machines?7774
There, i have described, how to build a new CAB.
After that, you have to alter the file table an put the sequence of this file at the highest number.
Regards, Nick
it is not possible to alter a CAB-file with an MST.
The easiest approach is to build a new CAB-file with the changed file in it.
See this thread: http://itninja.com/question/how-do-you-roll-out-new-machines?7774
There, i have described, how to build a new CAB.
After that, you have to alter the file table an put the sequence of this file at the highest number.
Regards, Nick
Posted by:
deploy.no
17 years ago
Well, you don't actually have to create a cab-file if you don't require it for some reason. You could just put the file you want to replace in the msi source dir and change its entry in the File table as required, using the msidbFileAttributesNonCompressed attribute to flag that it is an external file. I do this regularly in my transforms to swap out config files and the like ..
- In the File table, set new values for filename, filesize, attributes (which would be 8192) and sequence number.
- In the Media table, add a new row with the last diskid +1 and the last sequence number +1.
Posted by:
anonymous_9363
17 years ago
I don't know about InstallShield but WPS has a tendency to disappear up its own rear end if you try and mess with CABs and switching from external to internal. If an MSI uses an external CAB, WPS creates an additional CAB for any transform. On the few occasions when I have tried to tidy up the slew of CABs which get created during changes by manipulating the File and Media tables, the final install always screwed up, with errors concerning files missing from the CAB. I no longer bother.
Posted by:
deploy.no
17 years ago
Posted by:
nheim
17 years ago
Hi deploy.no,
of course, you are right with putting the file just to the MSI source dir. That's the easiest approach.
However, Scott was specifically asking about the CAB files. Most of the time, i also create an extra CAB myself. Then i place the CAB in a stream in a binary table (Cabs table on a Wise built MSI, Binary table on the others), because MST's can't hold streams outside a table. With this, i can contain everything what belongs to the change, in one single MST-file.
And i agree 100% with your last post: Only the SDK tools give you the full control over the transforming process. And with a few scripts and batch files here and then, one can do this quite fast (and most important: reliable).
Regards, Nick
of course, you are right with putting the file just to the MSI source dir. That's the easiest approach.
However, Scott was specifically asking about the CAB files. Most of the time, i also create an extra CAB myself. Then i place the CAB in a stream in a binary table (Cabs table on a Wise built MSI, Binary table on the others), because MST's can't hold streams outside a table. With this, i can contain everything what belongs to the change, in one single MST-file.
And i agree 100% with your last post: Only the SDK tools give you the full control over the transforming process. And with a few scripts and batch files here and then, one can do this quite fast (and most important: reliable).
Regards, Nick
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.