[1/3] msi: Search all contexts in ACTION_GetComponentInstallStates.
Hans Leidekker
hans at codeweavers.com
Thu Jan 20 02:06:19 CST 2011
---
dlls/msi/action.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 8cf80bf..4bd5157 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -1834,11 +1834,9 @@ static UINT ACTION_FileCost(MSIPACKAGE *package)
static void ACTION_GetComponentInstallStates(MSIPACKAGE *package)
{
MSICOMPONENT *comp;
- INSTALLSTATE state;
+ INSTALLSTATE state = MsiQueryProductStateW( package->ProductCode );
UINT r;
- state = MsiQueryProductStateW(package->ProductCode);
-
LIST_FOR_EACH_ENTRY(comp, &package->components, MSICOMPONENT, entry)
{
if (!comp->ComponentId) continue;
@@ -1847,9 +1845,17 @@ static void ACTION_GetComponentInstallStates(MSIPACKAGE *package)
comp->Installed = INSTALLSTATE_ABSENT;
else
{
- r = MsiQueryComponentStateW(package->ProductCode, NULL,
- package->Context, comp->ComponentId,
- &comp->Installed);
+ r = MsiQueryComponentStateW( package->ProductCode, NULL,
+ MSIINSTALLCONTEXT_USERMANAGED, comp->ComponentId,
+ &comp->Installed );
+ if (r != ERROR_SUCCESS)
+ r = MsiQueryComponentStateW( package->ProductCode, NULL,
+ MSIINSTALLCONTEXT_USERUNMANAGED, comp->ComponentId,
+ &comp->Installed );
+ if (r != ERROR_SUCCESS)
+ r = MsiQueryComponentStateW( package->ProductCode, NULL,
+ MSIINSTALLCONTEXT_MACHINE, comp->ComponentId,
+ &comp->Installed );
if (r != ERROR_SUCCESS)
comp->Installed = INSTALLSTATE_ABSENT;
}
--
1.7.1
More information about the wine-patches
mailing list