msi: Add support for ProductToBeRegistered property.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
40ce1dd473
commit
6dc49e4b68
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue