In Python 2.7.6 can't find any way to close MSI database after finish working with it.
As a result database is locked and can't be opened by any other application until Python process is finished.
import msilib
db = msilib.OpenDatabase('test.msi', msilib.MSIDBOPEN_TRANSACT)
view = db.OpenView("SELECT File, Component_, FileName FROM File")
view.Execute(None)
r1 = view.Fetch()
r1.SetString(3,"test.txt")
view.Modify(msilib.MSIMODIFY_UPDATE, r1)
view.Close()
db.Commit()
del db
db2 = msilib.OpenDatabase('test.msi', msilib.MSIDBOPEN_TRANSACT)
MSIError: 1: 2203 2: test.msi 3: -2147287008 |