This issue is caused by a user account that does not have proper privileges to the database. The MsiGetActiveDatabase function returns the active database for the installation. This function returns a read-only handle and can fail if proper permissions are not set.