Vendor MSI

Definition

Since many software manufacturers use Windows Installer, a large number of applications (in addition to the well-known setup.exe) come with MSI files.

More about packaging options can be found here.

Seller Vendor Customization

It wouldn’t make sense to recreate an MSI if an application already comes with an MSI file. Instead, it is best to customize it with the help of .mst files, and adjust it to be installed as the user wants.

The possibility for customization does not mean that this MSI file can be 100% modified. Consider any changes with great care to avoid altering the logical structure of the MSI. Nobody knows how an MSI was created and the final result shouldn’t be different from what it was initially.

There are several options to find out how to configure the MSI to be installed as needed:

  1. Creating an installation log, and using it to identify the parameters sent to the MSI
  2. Using the various tools offered by Advanced Installer or Wise, to create the mst based on the installation simulations
  3. Or you can read/investigate the dialogs in MSI to possibly identify what is required for each installation window.

MSI vendor do’s and don’ts:

  • You can add and delete properties
  • You can add and delete files, registry, services, shortcuts (paying close attention to not damage the logic of the MSI)
  • You can include Custom Actions, but deleting CAs is not recommended (at most they can be commented)
  • You should not modify ProductVersion, ProductCode, UpgradeCode from an MSI (because they are needed for subsequent upgrades)

Most software vendors deliver the MSI file by default, but they can also deliver this file hidden in the setup. In addition, they can also deliver msp files.

Depending on the delivery option, there are several vendor approaches to MSIs.

Direct vendor MSI

When a vendor directly provides an MSI, we customize it with a transform file (mst). At the end, you need to perform some checks to make sure the installation with the MST behaves the same as the original MSI.

To check the install behavior between the original MSI and the MST you can use one of the tools mentioned in section "List features and components for installed MSIs" of this book.

Vendor MSI hidden in setup

Most manufacturers hide the MSI in the setup. To detect if there is an MSI vendor behind a setup, monitor the Task Manager during installation. If the msiexec.exe process appears in the list, it means that we are dealing with an MSI vendor.

To find where the setup copies of the MSI file are, we can use Procmon. Usually, Windows Installer copies the files needed to install the setup ( i.e. the MSI itself with its files and possibly some configuration files) in the temp directory of the current user.

Once the MSI file is recovered, a check is performed to see if the installation is identical to the one made with the setup.

Vendor MSI with patch

In addition to the MSI file, the software manufacturer may deliver a patch--an MSP file that fixes various MSI bugs.

The patch only contains the “improvements” to the MSI. It cannot be installed alone on the machine. It needs to find the MSI to modify.

Modify an MSI vendor, from cab outside to cab inside, etc.

There are situations that require the transformation of an “MSI with cab outside” into an “MSI with cab inside”. There are two ways to do this:

  • with a script
  • by converting MSI to WSI

Windows Installer has a tool for modifying MSIs called MAKECAB.EXE. With its help and a script, you can transform an MSI from cab outside to cab inside, and vice versa.

There are just a few steps you need to take:

  1. Perform an admin install of MSI: msiexec /a Name.msi TARGETDIR=”c:\temp\mymsi\”
  2. Perform the transformation using the command line: cscript [WiMakeCab ...] / c / u / s / e [Name.msi], right from the directory where the admin install was made (”c:\temp\mymsi\”), with the help of the exe and vbs files

The argument (s) is the one that turns the cable outside. Following the admin install, the MSI files are expanded. If the command is run with / e --then it results in an MSI with cab inside, if you use a command without / e -- then you will get an MSI with cab outside.