Replacing files in existing MSI packages

Today I faced a problem where I needed to replace one file in existing MSI package. I did not want to rebuild the package again from SVN using some branch or tag. So I was looking for some utility, which would allow me to replace a file in MSI with new version. There is an Orca utility in the Windows SDK, but doing such operation with it is quite tricky.
After some digging I found quite nice application on the internet which allows you rebuild cab files inside the MSI and so allows you to replace files. The application is called InstEd.
Download the free version and open it. It looks a bit similar to the Orca, but has more features. To replace file in a specified cab, you have to first put the files next to the MSI package using the same folder structure as defined in the MSI. Find file you would like to update and replace it. Then go to the Tables tab and select Media. Right click the cab, which contains the updated file and click Rebuild selected CABs. After replace is finished save the MSI and you are done.

3 thoughts on “Replacing files in existing MSI packages

  1. I appreciate the effort, but I feel like there are necessary steps missing; like how exactly do you: “Find file you would like to update and replace it.” Does this replace process happen in InstEd? Did you extract the entire contents of the msi prior? I’ll keep looking on the interwebs…

  2. i have single msi without any files. I get same errors: “Failed to find file key…”
    I copy all installed files near my msi file. Then error has gone

Leave a Reply

Your email address will not be published. Required fields are marked *