msi: Fall back to the database summary information stream in MSI_OpenPackageW.

This commit is contained in:
Hans Leidekker 2015-03-25 14:31:47 +01:00 committed by Alexandre Julliard
parent 248bd63b53
commit 052b3a748e
3 changed files with 16 additions and 7 deletions

View File

@ -952,6 +952,7 @@ extern UINT msi_spawn_error_dialog( MSIPACKAGE*, LPWSTR, LPWSTR ) DECLSPEC_HIDDE
/* summary information */
extern UINT msi_get_suminfo( IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **si ) DECLSPEC_HIDDEN;
extern UINT msi_get_db_suminfo( MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **si ) DECLSPEC_HIDDEN;
extern LPWSTR msi_suminfo_dup_string( MSISUMMARYINFO *si, UINT uiProperty ) DECLSPEC_HIDDEN;
extern INT msi_suminfo_get_int32( MSISUMMARYINFO *si, UINT uiProperty ) DECLSPEC_HIDDEN;
extern LPWSTR msi_get_suminfo_product( IStorage *stg ) DECLSPEC_HIDDEN;

View File

@ -1488,8 +1488,12 @@ static WCHAR *get_package_code( MSIDATABASE *db )
r = msi_get_suminfo( db->storage, 0, &si );
if (r != ERROR_SUCCESS)
{
WARN("failed to load summary info %u\n", r);
return NULL;
r = msi_get_db_suminfo( db, 0, &si );
if (r != ERROR_SUCCESS)
{
WARN("failed to load summary info %u\n", r);
return NULL;
}
}
ret = msi_suminfo_dup_string( si, PID_REVNUMBER );
msiobj_release( &si->hdr );
@ -1638,9 +1642,13 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
r = msi_get_suminfo( db->storage, 0, &si );
if (r != ERROR_SUCCESS)
{
WARN("failed to load summary info\n");
msiobj_release( &package->hdr );
return ERROR_INSTALL_PACKAGE_INVALID;
r = msi_get_db_suminfo( db, 0, &si );
if (r != ERROR_SUCCESS)
{
WARN("failed to load summary info\n");
msiobj_release( &package->hdr );
return ERROR_INSTALL_PACKAGE_INVALID;
}
}
r = parse_suminfo( si, package );
msiobj_release( &si->hdr );

View File

@ -469,7 +469,7 @@ UINT msi_get_suminfo( IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **ret )
return ERROR_SUCCESS;
}
static UINT get_db_suminfo( MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **ret )
UINT msi_get_db_suminfo( MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **ret )
{
IStream *stm;
MSISUMMARYINFO *si;
@ -547,7 +547,7 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase,
ret = msi_get_suminfo( db->storage, uiUpdateCount, &si );
if (ret != ERROR_SUCCESS)
ret = get_db_suminfo( db, uiUpdateCount, &si );
ret = msi_get_db_suminfo( db, uiUpdateCount, &si );
if (ret != ERROR_SUCCESS)
{
if ((si = create_suminfo( db->storage, uiUpdateCount )))