msidb allows developers to remove "streams" (cabinet files) from a database with the "-k" mode flag. To support that feature we need MSIMODIFY_DELETE support in the underlying MSI implementation.
Per Hans' request, this version has been updated with additional error checking, unconditionally releasing the stream (see tests), and added tests for the strange behavior that occurs when deleting in-use streams.
The series has also been reordered to include all changes to msi first and msidb support for them afterwards.
Best, Erich