Discussion:
Msi API Error 80004005
(too old to reply)
dch
2007-04-30 13:59:46 UTC
Permalink
Hi all,

Following is code in a button handler:

Dim installer
Dim database
Dim szMSI
Dim View

szMSI = "c:\Setup.msi"
installer = CreateObject("WindowsInstaller.Installer")

database = installer.OpenDatabase(szMSI, 2)

database.Commit()
database = Nothing
installer = Nothing


After I run the app and click the button two times, I get the error msg
following:

Msi API Error 80004005: OpenDatabase, DatabasePath, OpenMode
1:2003 2:<msi path> 3:-2147287007

Thanks.
Rob Hamflett
2007-04-30 14:48:25 UTC
Permalink
If you put -2147287007 into VS's Error Lookup utility, it turns out to be 0x80030021, with the
message "A lock violation has occurred.". Dunno if that helps at all.

Rob
Post by dch
Hi all,
Dim installer
Dim database
Dim szMSI
Dim View
szMSI = "c:\Setup.msi"
installer = CreateObject("WindowsInstaller.Installer")
database = installer.OpenDatabase(szMSI, 2)
database.Commit()
database = Nothing
installer = Nothing
After I run the app and click the button two times, I get the error msg
Msi API Error 80004005: OpenDatabase, DatabasePath, OpenMode
1:2003 2:<msi path> 3:-2147287007
Thanks.
dch
2007-04-30 16:54:03 UTC
Permalink
In the end, I have set 'installer' to nothing, is it still lock violation?
How to open the lock?

Thanks!
Post by Rob Hamflett
If you put -2147287007 into VS's Error Lookup utility, it turns out to be
0x80030021, with the message "A lock violation has occurred.". Dunno if
that helps at all.
Rob
Post by dch
Hi all,
Dim installer
Dim database
Dim szMSI
Dim View
szMSI = "c:\Setup.msi"
installer = CreateObject("WindowsInstaller.Installer")
database = installer.OpenDatabase(szMSI, 2)
database.Commit()
database = Nothing
installer = Nothing
After I run the app and click the button two times, I get the error msg
Msi API Error 80004005: OpenDatabase, DatabasePath, OpenMode
1:2003 2:<msi path> 3:-2147287007
Thanks.
dch
2007-05-01 03:37:31 UTC
Permalink
I click the button first time, there's no error. The error occurs when I
click the button second time.
Post by Rob Hamflett
If you put -2147287007 into VS's Error Lookup utility, it turns out to be
0x80030021, with the message "A lock violation has occurred.". Dunno if
that helps at all.
Rob
Post by dch
Hi all,
Dim installer
Dim database
Dim szMSI
Dim View
szMSI = "c:\Setup.msi"
installer = CreateObject("WindowsInstaller.Installer")
database = installer.OpenDatabase(szMSI, 2)
database.Commit()
database = Nothing
installer = Nothing
After I run the app and click the button two times, I get the error msg
Msi API Error 80004005: OpenDatabase, DatabasePath, OpenMode
1:2003 2:<msi path> 3:-2147287007
Thanks.
dch
2007-05-01 07:11:58 UTC
Permalink
After I click the button one time, I keep my app running, the MSI file my
app have ever openned can't be openned by Wise for Windows Installer and I'm
told that "sharing violation occured". After I close my app, the MSI file is
openned.

Thanks.
Post by Rob Hamflett
If you put -2147287007 into VS's Error Lookup utility, it turns out to be
0x80030021, with the message "A lock violation has occurred.". Dunno if
that helps at all.
Rob
Post by dch
Hi all,
Dim installer
Dim database
Dim szMSI
Dim View
szMSI = "c:\Setup.msi"
installer = CreateObject("WindowsInstaller.Installer")
database = installer.OpenDatabase(szMSI, 2)
database.Commit()
database = Nothing
installer = Nothing
After I run the app and click the button two times, I get the error msg
Msi API Error 80004005: OpenDatabase, DatabasePath, OpenMode
1:2003 2:<msi path> 3:-2147287007
Thanks.
Continue reading on narkive:
Loading...