- Download the MSI file and the CAB to the same folder.
- Create a folder called “a”.
- Do an administrative install. Go to the command line and enter (on one line):
msiexec /a "PATH_OF_MSI" TARGETDIR="PATH_OF_FOLDER_A" /passiveFor example:
msiexec /a "C:\Users\Alasdair\Desktop\ClaroReadPlus-en_gb-7.3.3-net-X.msi" TARGETDIR="C:\Users\Alasdair\Desktop\a" /passive
You will find an (altered) copy of the MSI in the “a” folder along with new folders containing all the files in the installation.
Note: TARGETDIR is case-sensitive and we find it much easier to use complete paths for simplicity.
- You need a file from Microsoft called wimakcab.vbs. You can find it in the Windows SDK, but to save you time: Download wimakcab.vbs.
- On your commandline enter (one one line):
cscript PATH_OF_WIMAKCAB.VBS PATH_OF_NEW_MSI newcab.cab /C /U /E
cscript "C:\Users\Alasdair\Desktop\wimakcab.vbs" "C:\Users\Alasdair\Desktop\a\ClaroReadPlus-en_gb-7.3.3-net-X.msi" newcab.cab /C /U /E
You should now find that your MSI in the “a” folder has increased in size as all the files have been embedded in it. You can now deploy this MSI file as required, and delete the downloaded MSI, CAB, and folders you have created.
Note that the MSI file will no longer be digitally-signed (as it has been altered since we signed it) but this should not affect your deployment.