How to replace a file in a msi installer?

luntain picture luntain · Sep 24, 2008 · Viewed 56.9k times · Source

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

Answer

Keith Harrison picture Keith Harrison · Feb 24, 2011

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.