How to replace a file in a msi installer?

windows-installer

Solution

Use msi2xml.

This command extracts the MSI files:

msi2xml -c OutputDir TestMSI.MSI

Open OutputDir and modify the file.

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.

Problem

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

Original source