msi: Return INSTALLSTATE_UNKNOWN from MsiGetComponentState if the component is disabled.

This commit is contained in:
Hans Leidekker 2010-12-23 17:07:13 +01:00 committed by Alexandre Julliard
parent 0f3ff8b4b1
commit 7bc7d09109
1 changed files with 12 additions and 3 deletions

View File

@ -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;
}