/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (7)

Posted by: anonymous_9363 16 years ago
Red Belt
0
IIRC, there is a script in the SDK which allows you to manipulate CABs. I think it's called WiMakCab.VBS.
Posted by: gizsha 16 years ago
Purple Belt
0
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
Posted by: nheim 16 years ago
10th Degree Black Belt
0
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
Posted by: deploy.no 16 years ago
Orange Belt
0
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 16 years ago
Red Belt
0
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 16 years ago
Orange Belt
0
Straying a bit off topic, but I prefer to have total control over my transforms and as such I no longer use WPS or AdminStudio to create them. I use Orca and the SDK tools, but realize this is not for everyone ..
Posted by: nheim 16 years ago
10th Degree Black Belt
0
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ