Category Archives: MSI

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.