Skip to content

Commit da84836

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi: Add support for ProductToBeRegistered property.
Signed-off-by: Piotr Caban <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id 6dc49e4b685850a76a35b1d1d102903a0231c5cc by Piotr Caban <[email protected]>
1 parent d27e349 commit da84836

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

dll/win32/msi/action.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5236,7 +5236,8 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
52365236
UINT rc;
52375237

52385238
/* FIXME: also need to publish if the product is in advertise mode */
5239-
if (!msi_check_publish(package))
5239+
if (!msi_get_property_int( package->db, szProductToBeRegistered, 0 )
5240+
&& !msi_check_publish(package))
52405241
return ERROR_SUCCESS;
52415242

52425243
rc = MSIREG_OpenUninstallKey(package->ProductCode, package->platform, &hkey, TRUE);

dll/win32/msi/msipriv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,7 @@ static const WCHAR szInstallLocation[] = {'I','n','s','t','a','l','l','L','o','c
12011201
static const WCHAR szProperty[] = {'P','r','o','p','e','r','t','y',0};
12021202
static const WCHAR szUninstallable[] = {'U','n','i','n','s','t','a','l','l','a','b','l','e',0};
12031203
static const WCHAR szEXECUTEACTION[] = {'E','X','E','C','U','T','E','A','C','T','I','O','N',0};
1204+
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};
12041205

12051206
/* memory allocation macro functions */
12061207
static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);

dll/win32/msi/package.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,8 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
14711471
DWORD index = 0;
14721472
MSISUMMARYINFO *si;
14731473
BOOL delete_on_close = FALSE;
1474-
WCHAR *info_template, *productname;
1474+
WCHAR *info_template, *productname, *product_code;
1475+
MSIINSTALLCONTEXT context;
14751476

14761477
TRACE("%s %p\n", debugstr_w(szPackage), pPackage);
14771478

@@ -1567,6 +1568,14 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
15671568
set_installed_prop( package );
15681569
msi_set_context( package );
15691570

1571+
product_code = get_product_code( db );
1572+
if (msi_locate_product( product_code, &context ) == ERROR_SUCCESS)
1573+
{
1574+
TRACE("product already registered\n");
1575+
msi_set_property( package->db, szProductToBeRegistered, szOne, -1 );
1576+
}
1577+
msi_free(product_code);
1578+
15701579
while (1)
15711580
{
15721581
WCHAR patch_code[GUID_SIZE];

0 commit comments

Comments
 (0)