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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue