msi: Search all contexts in ACTION_GetComponentInstallStates.
This commit is contained in:
parent
4a2ac6c8bd
commit
8933013b62
@ -1834,11 +1834,9 @@ static UINT ACTION_FileCost(MSIPACKAGE *package)
|
|||||||
static void ACTION_GetComponentInstallStates(MSIPACKAGE *package)
|
static void ACTION_GetComponentInstallStates(MSIPACKAGE *package)
|
||||||
{
|
{
|
||||||
MSICOMPONENT *comp;
|
MSICOMPONENT *comp;
|
||||||
INSTALLSTATE state;
|
INSTALLSTATE state = MsiQueryProductStateW( package->ProductCode );
|
||||||
UINT r;
|
UINT r;
|
||||||
|
|
||||||
state = MsiQueryProductStateW(package->ProductCode);
|
|
||||||
|
|
||||||
LIST_FOR_EACH_ENTRY(comp, &package->components, MSICOMPONENT, entry)
|
LIST_FOR_EACH_ENTRY(comp, &package->components, MSICOMPONENT, entry)
|
||||||
{
|
{
|
||||||
if (!comp->ComponentId) continue;
|
if (!comp->ComponentId) continue;
|
||||||
@ -1847,9 +1845,17 @@ static void ACTION_GetComponentInstallStates(MSIPACKAGE *package)
|
|||||||
comp->Installed = INSTALLSTATE_ABSENT;
|
comp->Installed = INSTALLSTATE_ABSENT;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
r = MsiQueryComponentStateW(package->ProductCode, NULL,
|
r = MsiQueryComponentStateW( package->ProductCode, NULL,
|
||||||
package->Context, comp->ComponentId,
|
MSIINSTALLCONTEXT_USERMANAGED, comp->ComponentId,
|
||||||
&comp->Installed);
|
&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)
|
if (r != ERROR_SUCCESS)
|
||||||
comp->Installed = INSTALLSTATE_ABSENT;
|
comp->Installed = INSTALLSTATE_ABSENT;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user