Commit 6dc49e4b authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msi: Add support for ProductToBeRegistered property.

parent 40ce1dd4
......@@ -5222,7 +5222,8 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
UINT rc;
/* FIXME: also need to publish if the product is in advertise mode */
if (!msi_check_publish(package))
if (!msi_get_property_int( package->db, szProductToBeRegistered, 0 )
&& !msi_check_publish(package))
return ERROR_SUCCESS;
rc = MSIREG_OpenUninstallKey(package->ProductCode, package->platform, &hkey, TRUE);
......
......@@ -1200,6 +1200,7 @@ static const WCHAR szInstallLocation[] = {'I','n','s','t','a','l','l','L','o','c
static const WCHAR szProperty[] = {'P','r','o','p','e','r','t','y',0};
static const WCHAR szUninstallable[] = {'U','n','i','n','s','t','a','l','l','a','b','l','e',0};
static const WCHAR szEXECUTEACTION[] = {'E','X','E','C','U','T','E','A','C','T','I','O','N',0};
static const WCHAR szProductToBeRegistered[] = {'P','r','o','d','u','c','t','T','o','B','e','R','e','g','i','s','t','e','r','e','d',0};
/* memory allocation macro functions */
static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
......
......@@ -1471,7 +1471,8 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
DWORD index = 0;
MSISUMMARYINFO *si;
BOOL delete_on_close = FALSE;
WCHAR *info_template, *productname;
WCHAR *info_template, *productname, *product_code;
MSIINSTALLCONTEXT context;
TRACE("%s %p\n", debugstr_w(szPackage), pPackage);
......@@ -1560,6 +1561,14 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
set_installed_prop( package );
msi_set_context( package );
product_code = get_product_code( db );
if (msi_locate_product( product_code, &context ) == ERROR_SUCCESS)
{
TRACE("product already registered\n");
msi_set_property( package->db, szProductToBeRegistered, szOne, -1 );
}
msi_free(product_code);
while (1)
{
WCHAR patch_code[GUID_SIZE];
......
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