I'd like to read an MSI file into a MemoryStream (or something similar), and modify it. What's the easiest way to do this, without corrupting the MSI?
All I need to be able to do is modify the value of one of the properties in the MSI. I'd prefer something in .Net, but I'm open to other platforms.
Update:
Here's my working code, using the Windows platform SDK, a COM reference to Microsoft Windows Installer Object Library and namespace WindowsInstaller:
Installer installer = Activator.CreateInstance(Type.GetTypeFromProgID("WindowsInstaller.Installer")) as Installer;
Database msi = installer.OpenDatabase("WixTest.msi", MsiOpenDatabaseMode.msiOpenDatabaseModeTransact);
View view = msi.OpenView("update `Property` SET `Property`.`Value`='99' where `Property`='USERID'");
view.Execute(null);
msi.Commit();