From 98ae03ff4d1d8b1292301486b5ea30988de6fa51 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Tue, 4 Nov 2014 10:57:40 +0100 Subject: [PATCH] msi: Update properties after each transform that affects the property table. --- dlls/msi/action.c | 3 --- dlls/msi/dialog.c | 1 - dlls/msi/msipriv.h | 1 + dlls/msi/package.c | 7 ++----- dlls/msi/table.c | 6 ++++++ 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index eb7ac62a1a2..524c4f77f6b 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -7813,10 +7813,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, package->full_reinstall = 1; } - /* properties may have been added by a transform */ - msi_clone_properties( package->db ); msi_set_original_database_property( package->db, szPackagePath ); - msi_parse_command_line( package, szCommandLine, FALSE ); msi_adjust_privilege_properties( package ); msi_set_context( package ); diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 6708f1348b2..4e1052e5fa5 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -155,7 +155,6 @@ static const WCHAR szVolumeCostList[] = { 'V','o','l','u','m','e','C','o','s','t static const WCHAR szVolumeSelectCombo[] = { 'V','o','l','u','m','e','S','e','l','e','c','t','C','o','m','b','o',0 }; static const WCHAR szSelectionDescription[] = {'S','e','l','e','c','t','i','o','n','D','e','s','c','r','i','p','t','i','o','n',0}; static const WCHAR szSelectionPath[] = {'S','e','l','e','c','t','i','o','n','P','a','t','h',0}; -static const WCHAR szProperty[] = {'P','r','o','p','e','r','t','y',0}; static const WCHAR szHyperLink[] = {'H','y','p','e','r','L','i','n','k',0}; /* dialog sequencing */ diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index a66835efd17..fd7b1166747 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -1180,6 +1180,7 @@ static const WCHAR szName[] = {'N','a','m','e',0}; static const WCHAR szData[] = {'D','a','t','a',0}; static const WCHAR szLangResource[] = {'\\','V','a','r','F','i','l','e','I','n','f','o','\\','T','r','a','n','s','l','a','t','i','o','n',0}; static const WCHAR szInstallLocation[] = {'I','n','s','t','a','l','l','L','o','c','a','t','i','o','n',0}; +static const WCHAR szProperty[] = {'P','r','o','p','e','r','t','y',0}; /* memory allocation macro functions */ static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1); diff --git a/dlls/msi/package.c b/dlls/msi/package.c index c910d82677c..bf9c79ce4d6 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -1677,11 +1677,8 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage) } index++; } - if (index) - { - msi_clone_properties( package->db ); - msi_adjust_privilege_properties( package ); - } + if (index) msi_adjust_privilege_properties( package ); + r = msi_set_original_database_property( package->db, szPackage ); if (r != ERROR_SUCCESS) { diff --git a/dlls/msi/table.c b/dlls/msi/table.c index 9ed94214b87..900f9ae9fe8 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -2716,6 +2716,7 @@ UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg ) string_table *strings; UINT ret = ERROR_FUNCTION_FAILED; UINT bytes_per_strref; + BOOL property_update = FALSE; TRACE("%p %p\n", db, stg ); @@ -2760,6 +2761,8 @@ UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg ) tables = transform; else if (!strcmpW( transform->name, szColumns ) ) columns = transform; + else if (!strcmpW( transform->name, szProperty )) + property_update = TRUE; TRACE("transform contains stream %s\n", debugstr_w(name)); @@ -2809,7 +2812,10 @@ UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg ) } if ( ret == ERROR_SUCCESS ) + { append_storage_to_db( db, stg ); + if (property_update) msi_clone_properties( db ); + } end: if ( stgenum )