Converting an MSI-plus-CAB into a single MSI file

Published by Claro Software on

Creating a single MSI file for network installation.

Here’s the problem, we ship our Windows Installers as MSIs (installers) plus CAB (data) files – the MSI is the installer and the CAB files contain the actual files to be installed. We do this to save space on the target machine, since Windows will keep a hidden copy of the MSI file when you install, and because Windows Installer does not support Unicode for our international installers.

If you need to have a single MSI file, for example for MDM or InTune, then you can combine the MSI and CAB files we provide. This can be done using the MSI Creator included in the Claro Support Toolkit. This is how:

  1. Download the Claro Support Toolkit from here.
  2. Using either your own file archiver utility (such as winzip) or the built-in utility in Windows, extract the Support Toolkit and you will find the MSI Creator in its own folder.
  3. Run (double-click) the “Single MSI Creator.exe” file.

Using MSI Creator, you can select a folder that contains a combination of MSI and CAB files, select a product and language that you wish to combine, provide the location of the combined file and simply click Create! MSI Creator combines the files for you while you continue to work and alerts you when it completes.

Here is how to use MSI Creator:

  1. With MSI Creator opened, you are presented with the welcome screen. Click Open Folder.
  2. Select a folder that contains the Claro Software products that you wish to combine and press OK.

Note: MSI Creator will look in the selected folder for products to combine. MSI Creator will only look for MSIs that belong to Claro Software, which follow a strict naming convention. Please ensure that any products you wish to combine have the filenames they had when you acquired them. If they are named differently, MSI Creator will ignore them as these could be installers for non-Claro Software products.

  1. If MSI Creator is able to find any products, these will be listed in the main window. Both AUTH and NET versions of products will be displayed.
  2. Select the product you wish to combine and press “Select Product”.

Note: If at any time you believe you have made a mistake or wish to change a selection, simply press the back button and you can change your selection.

  1. All languages available for that product will now be displayed. Select the language of the product you wish to combine and press “Select Language”. This selects a specific MSI from the folder based on the chosen product and language.
  2. You will now be presented with the final page of MSI Creator. Click “Create MSI”. You can now choose the location to save the combined MSI file. By default this is the same location as the original MSI, without the “-X” at the end of the filename.
  3. Select the filename and location and click “Save”.

Note: The CAB file that an MSI is linked to is stored internally within the MSI. Ensure this has the same name as it did when you acquired it. If it has been renamed or is not in the same folder, MSI Creator will not be able to find it and will alert you to this situation.

  1. The main window will now say “Processing, Please Wait…” while MSI Creator combines the MSI file with its respective CAB file in the background. For smaller MSI/CAB files, this will be a quick operation. For larger combinations, such as ClaroRead, this will take some time to perform.
  2. Upon completion, an alert will appear, informing you that the combining has completed and the location of the saved combined MSI. Press OK and MSI Creator closes. To combine more MSI/CABs, run MSI Creator again and follow this same procedure.

You should now find that the combined MSI is larger in size than its original counterpart. You can now deploy this MSI as required and delete the original MSI and CAB files. The newly created MSI file will keep the digital signature of the original MSI file and installation of this MSI will perform exactly the same as the original MSI, any differences happen internally within Windows Installer.

How to do it manually

If you wish to do this manually without the use of MSI Creator, it is possible, this is how:

  1. Download the MSI file and the CAB to the same folder.
  2. Create a folder called “a”.
  3. 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.

  1. 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.
  2. On your commandline enter (one one line):
    For example:
    cscript "C:\Users\Alasdair\Desktop\wimakcab.vbs" "C:\Users\Alasdair\Desktop\a\ClaroReadPlus-en_gb-7.3.3-net-X.msi" /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.

This page was last updated on 23rd February 2018.