View Full Version : Installer.OpenDatabase during installation

06-08-2005, 10:24 AM
Because the OpenDatabase method initiates database access, it cannot be used with a running installation.
Does this mean, I cannot have a Custom action using a VBscript with the following code snippet.

dim Installer
dim Database
const msiOpenDatabaseModeReadOnly = 0

Set Installer = CreateObject("WindowsInstaller.Installer")
Set Database = Installer.OpenDatabase("C:\test.msi", msiOpenDatabaseModeReadOnly)

If this cannot be done, any other way to read the msi package during installation.

Thanks in advance.

06-10-2005, 09:46 AM
instead of the line:
Set Installer = CreateObject("WindowsInstaller.Installer")

use the following line:
Set Installer = Session.Installer