Commit bcba82dc authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Open the install properties key based on the install context.

parent e21a26e4
...@@ -3350,6 +3350,10 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) ...@@ -3350,6 +3350,10 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
rc = MSIREG_OpenLocalClassesProductKey(package->ProductCode, &hukey, TRUE); rc = MSIREG_OpenLocalClassesProductKey(package->ProductCode, &hukey, TRUE);
if (rc != ERROR_SUCCESS) if (rc != ERROR_SUCCESS)
goto end; goto end;
rc = MSIREG_OpenLocalSystemInstallProps(package->ProductCode, &props, TRUE);
if (rc != ERROR_SUCCESS)
goto end;
} }
else else
{ {
...@@ -3360,6 +3364,10 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) ...@@ -3360,6 +3364,10 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
rc = MSIREG_OpenUserProductsKey(package->ProductCode,&hukey,TRUE); rc = MSIREG_OpenUserProductsKey(package->ProductCode,&hukey,TRUE);
if (rc != ERROR_SUCCESS) if (rc != ERROR_SUCCESS)
goto end; goto end;
rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE);
if (rc != ERROR_SUCCESS)
goto end;
} }
rc = RegCreateKeyW(hukey, szSourceList, &source); rc = RegCreateKeyW(hukey, szSourceList, &source);
...@@ -3372,10 +3380,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) ...@@ -3372,10 +3380,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
if (rc != ERROR_SUCCESS) if (rc != ERROR_SUCCESS)
goto end; goto end;
rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE);
if (rc != ERROR_SUCCESS)
goto end;
buffer = msi_dup_property( package, INSTALLPROPERTY_PRODUCTNAMEW ); buffer = msi_dup_property( package, INSTALLPROPERTY_PRODUCTNAMEW );
msi_reg_set_val_str( hukey, INSTALLPROPERTY_PRODUCTNAMEW, buffer ); msi_reg_set_val_str( hukey, INSTALLPROPERTY_PRODUCTNAMEW, buffer );
msi_free(buffer); msi_free(buffer);
...@@ -3995,9 +3999,18 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package) ...@@ -3995,9 +3999,18 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
if (rc != ERROR_SUCCESS) if (rc != ERROR_SUCCESS)
return rc; return rc;
if (package->Context == MSIINSTALLCONTEXT_MACHINE)
{
rc = MSIREG_OpenLocalSystemInstallProps(package->ProductCode, &props, TRUE);
if (rc != ERROR_SUCCESS)
return rc;
}
else
{
rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE); rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &props, TRUE);
if (rc != ERROR_SUCCESS) if (rc != ERROR_SUCCESS)
return rc; return rc;
}
/* dump all the info i can grab */ /* dump all the info i can grab */
/* FIXME: Flesh out more information */ /* FIXME: Flesh out more information */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment