Create external .cab file from files in msi
I was trying to create an external .cab file for the files containted in an msi (to speed up the installation through SMS - so the files are not cached locally on the client). I was using the WiMakCab.vbs tool to do this using the following command line: cscript //nologo WiMakCab.vbs (installername).msi (cabinet file name) /C /U. It creates a .ddf file, but unfortunatly tells me that all the files contained in the .msi are not available. I'm I missing a step here? Everything I read tells me this is the way to go about doing this (it's much easier to do this through Wise-we don't have that) and it should update the file and media table. Can someone give me an idea of what I'm doing wrong? Thank you.
0 Comments
[ + ] Show comments
Answers (9)
Please log in to answer
Posted by:
spartacus
17 years ago
The following procedure will convert a vendor MSI containing an internal CAB to an external CAB MSI.
1) Perform an administrative installation of the original vendor's MSI. msiexec /a <Name of Vendor's MSI>. When prompted, select a suitable target folder for the admin point (e.g. C:\adminpoint).
2) Copy the file WiMakCab.vbs to the folder chosen for the admin point (e.g. C:\adminpoint).
3) Open a command prompt and at the adminpoint folder chosen - in the above example you would type :
[font="Courier New"]C:
CD \Adminpoint
4) Now issue the following command at the command prompt to create an external cab named data1.cab.
cscript WiMakCab.vbs /C /U <Name of the vendor's MSI> data1
5) Now inspect the adminpoint folder. There should now be a file, data1.cab alongside the vendor's MSI in the folder
6) The WiMakCab.vbs script only allows you 8 characters for the cab name, so if you wish to give the external CAB a longer (and more meaningful) name, this can be altered afterwards by editing the media table entry in the MSI in the adminpoint folder - ORCA is fine for this job, BTW.
7) If you decided to change the media table at step 6, you should then rename the file data1.cab in the adminpoint folder to reflect the change you made in the media table.
8) You should now have a cab-free MSI plus an external cab in the adminpoint folder.
Regards,
Spartacus
1) Perform an administrative installation of the original vendor's MSI. msiexec /a <Name of Vendor's MSI>. When prompted, select a suitable target folder for the admin point (e.g. C:\adminpoint).
2) Copy the file WiMakCab.vbs to the folder chosen for the admin point (e.g. C:\adminpoint).
3) Open a command prompt and at the adminpoint folder chosen - in the above example you would type :
[font="Courier New"]C:
CD \Adminpoint
4) Now issue the following command at the command prompt to create an external cab named data1.cab.
cscript WiMakCab.vbs /C /U <Name of the vendor's MSI> data1
5) Now inspect the adminpoint folder. There should now be a file, data1.cab alongside the vendor's MSI in the folder
6) The WiMakCab.vbs script only allows you 8 characters for the cab name, so if you wish to give the external CAB a longer (and more meaningful) name, this can be altered afterwards by editing the media table entry in the MSI in the adminpoint folder - ORCA is fine for this job, BTW.
7) If you decided to change the media table at step 6, you should then rename the file data1.cab in the adminpoint folder to reflect the change you made in the media table.
8) You should now have a cab-free MSI plus an external cab in the adminpoint folder.
Regards,
Spartacus
Posted by:
anonymous_9363
17 years ago
ORIGINAL: danr29[Whisper]Why not d/l an eval copy of Wise to get you out of your temporary predicament? Then you can work out the issue more or less at your leisure. BTW, use ProcMon or FileMon (freeware from SysInternals) to see what the script is doing (or not, as the case may be) as an aid in your diagnostics.
(it's much easier to do this through Wise-we don't have that)
Posted by:
nheim
17 years ago
Hi Dan,
this is done easiest with the tools from the SDK.
Load the MSI into ORCA and have a look at the media table and note the name(s) of the CAB-file(s).
call msidb -d your.msi -x cabfile.cab
Load the MSI into ORCA again and remove the # in front of the cabfile entry in the media table.
That's all!
No repacking needed here.
Regard, Nick
this is done easiest with the tools from the SDK.
Load the MSI into ORCA and have a look at the media table and note the name(s) of the CAB-file(s).
call msidb -d your.msi -x cabfile.cab
Load the MSI into ORCA again and remove the # in front of the cabfile entry in the media table.
That's all!
No repacking needed here.
Regard, Nick
Posted by:
danr29
17 years ago
Posted by:
nheim
17 years ago
Hi Dan,
you need to give the steams exact location. (e.g. Wise authored MSI's put their CAB's into the table Cabs table).
You have to put the name of the Cab behind '-x' exactly as in the media table without the Hashmark (#) in front.
Another way would be to call the MSI with "cscript wistream.vbs" (also from the SDK). This lists all the streams in a MSI.
msidb -d your.msi -x cabfile.cab
This worked all the time for me so far.
Good luck.
Regards, Nick
you need to give the steams exact location. (e.g. Wise authored MSI's put their CAB's into the table Cabs table).
You have to put the name of the Cab behind '-x' exactly as in the media table without the Hashmark (#) in front.
Another way would be to call the MSI with "cscript wistream.vbs" (also from the SDK). This lists all the streams in a MSI.
msidb -d your.msi -x cabfile.cab
This worked all the time for me so far.
Good luck.
Regards, Nick
Posted by:
spartacus
17 years ago
Hello again.
Regarding Nick's method, the last parameter in the command is case-sensitive so that may be where it is failing for you (?)
As a check, put a copy of the Platform SDK script WIStream.vbs in the same folder as the MSI and then run :
cscript WIStream.vbs <Name of your MSI>
from a command prompt.
this will list all the streams in your package, one of which will be the internal CAB. Make a note of the CAB name exactly as displayed and then use this as the last parameter with the msidb command.
I've tried it myself and it works a treat (thanks Nick [:)])
Spartacus
Whoops .. Reply Clash - great minds think alike [;)]
Regarding Nick's method, the last parameter in the command is case-sensitive so that may be where it is failing for you (?)
As a check, put a copy of the Platform SDK script WIStream.vbs in the same folder as the MSI and then run :
cscript WIStream.vbs <Name of your MSI>
from a command prompt.
this will list all the streams in your package, one of which will be the internal CAB. Make a note of the CAB name exactly as displayed and then use this as the last parameter with the msidb command.
I've tried it myself and it works a treat (thanks Nick [:)])
Spartacus
Whoops .. Reply Clash - great minds think alike [;)]
Posted by:
danr29
17 years ago
Posted by:
TrailVersion
14 years ago
Hello
Here is an another way to take out the CAB file from MSI. If u r using WISE, then
>> Open ur MSI
>> Go to Media section in Installation Expert.
>> Select the media entry in left pane, click Details
>> now change the compression option to "Compress files into external CAB files"
>> Click Ok the complie by clicking the complie button in Left-Bottom.
Done.
Here is an another way to take out the CAB file from MSI. If u r using WISE, then
>> Open ur MSI
>> Go to Media section in Installation Expert.
>> Select the media entry in left pane, click Details
>> now change the compression option to "Compress files into external CAB files"
>> Click Ok the complie by clicking the complie button in Left-Bottom.
Done.
Posted by:
rajdera1
14 years ago
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.