LPWSTR prop;
LPWSTR newprop;
DWORD len;
+ UINT r;
- prop = msi_dup_property(package, action_property );
+ prop = msi_dup_property(package->db, action_property );
if (prop)
len = strlenW(prop);
else
newprop[0] = 0;
strcatW(newprop,productid);
- MSI_SetPropertyW(package, action_property, newprop);
- TRACE("Found Related Product... %s now %s\n",debugstr_w(action_property),
- debugstr_w(newprop));
+ r = msi_set_property( package->db, action_property, newprop );
+ if (r == ERROR_SUCCESS && !strcmpW( action_property, cszSourceDir ))
+ msi_reset_folders( package, TRUE );
+
+ TRACE("Found Related Product... %s now %s\n",
+ debugstr_w(action_property), debugstr_w(newprop));
+
msi_free( prop );
msi_free( newprop );
}
(LPBYTE)&check, &sz);
/* check min */
ver = MSI_RecordGetString(rec,2);
- comp_ver = msi_version_str_to_dword(ver);
- r = check - comp_ver;
- if (r < 0 || (r == 0 && !(attributes &
- msidbUpgradeAttributesVersionMinInclusive)))
+ if (ver)
{
- RegCloseKey(hukey);
- index ++;
- continue;
+ comp_ver = msi_version_str_to_dword(ver);
+ r = check - comp_ver;
+ if (r < 0 || (r == 0 && !(attributes & msidbUpgradeAttributesVersionMinInclusive)))
+ {
+ RegCloseKey(hukey);
+ index ++;
+ continue;
+ }
}
/* check max */
ver = MSI_RecordGetString(rec,3);
- comp_ver = msi_version_str_to_dword(ver);
- r = check - comp_ver;
- if (r > 0 || (r == 0 && !(attributes &
- msidbUpgradeAttributesVersionMaxInclusive)))
+ if (ver)
{
- RegCloseKey(hukey);
- index ++;
- continue;
+ comp_ver = msi_version_str_to_dword(ver);
+ r = check - comp_ver;
+ if (r > 0 || (r == 0 && !(attributes & msidbUpgradeAttributesVersionMaxInclusive)))
+ {
+ RegCloseKey(hukey);
+ index ++;
+ continue;
+ }
}
/* check language*/
UINT rc = ERROR_SUCCESS;
MSIQUERY *view;
- if (msi_get_property_int(package, szInstalled, 0))
+ if (msi_get_property_int(package->db, szInstalled, 0))
{
TRACE("Skipping FindRelatedProducts action: product already installed\n");
return ERROR_SUCCESS;
}
- if (check_unique_action(package,szFindRelatedProducts))
+ if (check_unique_action(package, szFindRelatedProducts))
{
- TRACE("Skipping FindRelatedProducts action: already done on client side\n");
+ TRACE("Skipping FindRelatedProducts action: already done in UI sequence\n");
return ERROR_SUCCESS;
}
else
- register_unique_action(package,szFindRelatedProducts);
+ register_unique_action(package, szFindRelatedProducts);
rc = MSI_DatabaseOpenViewW(package->db, Query, &view);
if (rc != ERROR_SUCCESS)