msi: Return INSTALLSTATE_UNKNOWN from MsiGetComponentState if the component is disabled.
This commit is contained in:
parent
0f3ff8b4b1
commit
7bc7d09109
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue