msi: Fall back to the database summary information stream in MSI_OpenPackageW.
This commit is contained in:
parent
248bd63b53
commit
052b3a748e
|
@ -952,6 +952,7 @@ extern UINT msi_spawn_error_dialog( MSIPACKAGE*, LPWSTR, LPWSTR ) DECLSPEC_HIDDE
|
||||||
|
|
||||||
/* summary information */
|
/* summary information */
|
||||||
extern UINT msi_get_suminfo( IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **si ) DECLSPEC_HIDDEN;
|
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 LPWSTR msi_suminfo_dup_string( MSISUMMARYINFO *si, UINT uiProperty ) DECLSPEC_HIDDEN;
|
||||||
extern INT msi_suminfo_get_int32( 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;
|
extern LPWSTR msi_get_suminfo_product( IStorage *stg ) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -1488,8 +1488,12 @@ static WCHAR *get_package_code( MSIDATABASE *db )
|
||||||
r = msi_get_suminfo( db->storage, 0, &si );
|
r = msi_get_suminfo( db->storage, 0, &si );
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
WARN("failed to load summary info %u\n", r);
|
r = msi_get_db_suminfo( db, 0, &si );
|
||||||
return NULL;
|
if (r != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
WARN("failed to load summary info %u\n", r);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ret = msi_suminfo_dup_string( si, PID_REVNUMBER );
|
ret = msi_suminfo_dup_string( si, PID_REVNUMBER );
|
||||||
msiobj_release( &si->hdr );
|
msiobj_release( &si->hdr );
|
||||||
|
@ -1638,9 +1642,13 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
|
||||||
r = msi_get_suminfo( db->storage, 0, &si );
|
r = msi_get_suminfo( db->storage, 0, &si );
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
WARN("failed to load summary info\n");
|
r = msi_get_db_suminfo( db, 0, &si );
|
||||||
msiobj_release( &package->hdr );
|
if (r != ERROR_SUCCESS)
|
||||||
return ERROR_INSTALL_PACKAGE_INVALID;
|
{
|
||||||
|
WARN("failed to load summary info\n");
|
||||||
|
msiobj_release( &package->hdr );
|
||||||
|
return ERROR_INSTALL_PACKAGE_INVALID;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
r = parse_suminfo( si, package );
|
r = parse_suminfo( si, package );
|
||||||
msiobj_release( &si->hdr );
|
msiobj_release( &si->hdr );
|
||||||
|
|
|
@ -469,7 +469,7 @@ UINT msi_get_suminfo( IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **ret )
|
||||||
return ERROR_SUCCESS;
|
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;
|
IStream *stm;
|
||||||
MSISUMMARYINFO *si;
|
MSISUMMARYINFO *si;
|
||||||
|
@ -547,7 +547,7 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase,
|
||||||
|
|
||||||
ret = msi_get_suminfo( db->storage, uiUpdateCount, &si );
|
ret = msi_get_suminfo( db->storage, uiUpdateCount, &si );
|
||||||
if (ret != ERROR_SUCCESS)
|
if (ret != ERROR_SUCCESS)
|
||||||
ret = get_db_suminfo( db, uiUpdateCount, &si );
|
ret = msi_get_db_suminfo( db, uiUpdateCount, &si );
|
||||||
if (ret != ERROR_SUCCESS)
|
if (ret != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
if ((si = create_suminfo( db->storage, uiUpdateCount )))
|
if ((si = create_suminfo( db->storage, uiUpdateCount )))
|
||||||
|
|
Loading…
Reference in New Issue