How To: Replace A File In An Existing Installer

Replacing your installer in MSI vs EXE formatCopy link to this sectionLink to this section copied!

Since the process to change your installer can vary depending on the format you're working with, let's review the most common ones: MSI and EXE.

MSI format

If the vendor installer comes in the MSI format already, then you can create a transform file (MST) for it and get the file replaced within the MST. The MST, along with the new file included, will be used as a parameter for the install command line.

The transform file can be used to customize an installation without modifying the original MSI.

NoteIt is against Repackaging Best Practices to repackage MSI installers, unless you want to convert them to another packaging format, like App-V or MSIX.

To create the transform, follow the steps listed in the Create and edit an MST file article.

EXE format

If the vendor installer comes in an EXE format, then repackaging is the way to go. For EXE installers, you have the following options that we will discuss later in this article:

  1. Replacing the file as a post-install configuration operation during the repackaging process.
  2. Replacing the file on the captured files directly on the disk (following the repackaged files hierarchy).
  3. Importing and removing the file manually from the Repackager project.
  4. Changing the source path used in the generated Advanced Installer project with the path to the updated file.

TipThe Advanced Installer Features page presents a broader view of the features Advanced Installer offers, including the capability support for creating an MSI from scratch using the Repackager, and the possibility to edit existing MSIs (via MST or not).

Now that we know the differences between MSI and EXE when replacing a file in an installer, we can go into the how-to.

Tag » How To Replace A File