Module: wine Branch: master Commit: 7bc7d091097854148473cdcc67055e8d3d92f533 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7bc7d091097854148473cdcc67...
Author: Hans Leidekker hans@codeweavers.com Date: Thu Dec 23 17:07:13 2010 +0100
msi: Return INSTALLSTATE_UNKNOWN from MsiGetComponentState if the component is disabled.
---
dlls/msi/install.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/install.c b/dlls/msi/install.c index e2fe863..d34de8c 100644 --- a/dlls/msi/install.c +++ b/dlls/msi/install.c @@ -1181,13 +1181,22 @@ UINT MSI_GetComponentStateW(MSIPACKAGE *package, LPCWSTR szComponent, return ERROR_UNKNOWN_COMPONENT;
if (piInstalled) - *piInstalled = comp->Installed; + { + if (comp->Enabled) + *piInstalled = comp->Installed; + else + *piInstalled = INSTALLSTATE_UNKNOWN; + }
if (piAction) - *piAction = comp->Action; + { + if (comp->Enabled) + *piAction = comp->Action; + else + *piAction = INSTALLSTATE_UNKNOWN; + }
TRACE("states (%i, %i)\n", comp->Installed, comp->Action ); - return ERROR_SUCCESS; }