How to replace a file in a msi installer


I want to replace a single file inside a msi. How to do it?

Best Solution

Use msi2xml.

  1. This command extracts the MSI files:

    msi2xml -c OutputDir TestMSI.MSI

  2. Open OutputDir and modify the file.

  3. To rebuild the MSI run:

    xml2msi.exe -m TestMSI.xml

You need the -m to ignore the 'MD5 checksum test' that fails when an MSIs file(s) are modified.

Related Question