From 8722d0c44a10bd7a2e82182b9a05e7ba415cea37 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Tue, 23 Mar 2010 11:46:00 +0100 Subject: [PATCH] msi: The AppSearch and CCPSearch actions must be run only once. --- dlls/msi/action.c | 2 -- dlls/msi/appsearch.c | 16 ++++++++++++++++ dlls/msi/msipriv.h | 1 + dlls/msi/upgrade.c | 6 +++--- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index db6c2cdeb7..0d0e33367b 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -96,8 +96,6 @@ static const WCHAR szAllocateRegistrySpace[] = {'A','l','l','o','c','a','t','e','R','e','g','i','s','t','r','y','S','p','a','c','e',0}; static const WCHAR szBindImage[] = {'B','i','n','d','I','m','a','g','e',0}; -static const WCHAR szCCPSearch[] = - {'C','C','P','S','e','a','r','c','h',0}; static const WCHAR szDeleteServices[] = {'D','e','l','e','t','e','S','e','r','v','i','c','e','s',0}; static const WCHAR szDisableRollback[] = diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c index 12c741178e..6f00b14a5f 100644 --- a/dlls/msi/appsearch.c +++ b/dlls/msi/appsearch.c @@ -1064,6 +1064,14 @@ UINT ACTION_AppSearch(MSIPACKAGE *package) MSIQUERY *view = NULL; UINT r; + if (check_unique_action(package, szAppSearch)) + { + TRACE("Skipping AppSearch action: already done in UI sequence\n"); + return ERROR_SUCCESS; + } + else + register_unique_action(package, szAppSearch); + r = MSI_OpenQuery( package->db, &view, query ); if (r != ERROR_SUCCESS) return ERROR_SUCCESS; @@ -1111,6 +1119,14 @@ UINT ACTION_CCPSearch(MSIPACKAGE *package) MSIQUERY *view = NULL; UINT r; + if (check_unique_action(package, szCCPSearch)) + { + TRACE("Skipping AppSearch action: already done in UI sequence\n"); + return ERROR_SUCCESS; + } + else + register_unique_action(package, szCCPSearch); + r = MSI_OpenQuery(package->db, &view, query); if (r != ERROR_SUCCESS) return ERROR_SUCCESS; diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 0516dd18da..647eab7960 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -1084,6 +1084,7 @@ static const WCHAR szHU[] = {'H','K','E','Y','_','U','S','E','R','S','\\',0}; static const WCHAR szWindowsFolder[] = {'W','i','n','d','o','w','s','F','o','l','d','e','r',0}; static const WCHAR szAppSearch[] = {'A','p','p','S','e','a','r','c','h',0}; static const WCHAR szMoveFiles[] = {'M','o','v','e','F','i','l','e','s',0}; +static const WCHAR szCCPSearch[] = {'C','C','P','S','e','a','r','c','h',0}; /* memory allocation macro functions */ static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1); diff --git a/dlls/msi/upgrade.c b/dlls/msi/upgrade.c index a440070a4d..3f40f55bb6 100644 --- a/dlls/msi/upgrade.c +++ b/dlls/msi/upgrade.c @@ -209,13 +209,13 @@ UINT ACTION_FindRelatedProducts(MSIPACKAGE *package) return ERROR_SUCCESS; } - if (check_unique_action(package,szFindRelatedProducts)) + if (check_unique_action(package, szFindRelatedProducts)) { - TRACE("Skipping FindRelatedProducts action: already done on client side\n"); + TRACE("Skipping FindRelatedProducts action: already done in UI sequence\n"); return ERROR_SUCCESS; } else - register_unique_action(package,szFindRelatedProducts); + register_unique_action(package, szFindRelatedProducts); rc = MSI_DatabaseOpenViewW(package->db, Query, &view); if (rc != ERROR_SUCCESS)