winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
944 discussions
Start a n
N
ew thread
James Hawkins : msi: Handle the user managed context in MsiQueryFeatureState.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: 200eba3b9489f929f6d73d70ecb69a3505969658 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=200eba3b9489f929f6d73d70e…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jun 23 23:06:37 2008 -0500 msi: Handle the user managed context in MsiQueryFeatureState. --- dlls/msi/msi.c | 7 ++++--- dlls/msi/msipriv.h | 1 + dlls/msi/registry.c | 40 ++++++++++++++++++++++++++++++++++++++++ dlls/msi/tests/msi.c | 45 +++++++++------------------------------------ 4 files changed, 54 insertions(+), 39 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 1aaf4d9..b2e1345 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -1821,10 +1821,11 @@ INSTALLSTATE WINAPI MsiQueryFeatureStateW(LPCWSTR szProduct, LPCWSTR szFeature) if (!squash_guid( szProduct, squishProduct )) return INSTALLSTATE_INVALIDARG; - /* check that it's installed at all */ - rc = MSIREG_OpenUserFeaturesKey(szProduct, &hkey, FALSE); - if (rc != ERROR_SUCCESS) + if (MSIREG_OpenManagedFeaturesKey(szProduct, &hkey, FALSE) != ERROR_SUCCESS && + MSIREG_OpenUserFeaturesKey(szProduct, &hkey, FALSE) != ERROR_SUCCESS) + { return INSTALLSTATE_UNKNOWN; + } parent_feature = msi_reg_get_val_str( hkey, szFeature ); RegCloseKey(hkey); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 18a029f..fe880c6 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -788,6 +788,7 @@ extern UINT MSIREG_OpenLocalSystemComponentKey(LPCWSTR szComponent, HKEY *key, B extern UINT MSIREG_OpenLocalClassesProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create); extern UINT MSIREG_OpenLocalClassesFeaturesKey(LPCWSTR szProductCode, HKEY *key, BOOL create); extern UINT MSIREG_OpenLocalManagedProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create); +extern UINT MSIREG_OpenManagedFeaturesKey(LPCWSTR szProductCode, HKEY *key, BOOL create); extern UINT MSIREG_OpenLocalUserDataFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create); extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct); extern UINT MSIREG_DeleteLocalUserDataComponentKey(LPCWSTR szComponent); diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index beb98a8..a12a825 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -220,6 +220,16 @@ static const WCHAR szInstaller_LocalManagedProd_fmt[] = { 'I','n','s','t','a','l','l','e','r','\\', 'P','r','o','d','u','c','t','s','\\','%','s',0}; +static const WCHAR szInstaller_LocalManagedFeat_fmt[] = { +'S','o','f','t','w','a','r','e','\\', +'M','i','c','r','o','s','o','f','t','\\', +'W','i','n','d','o','w','s','\\', +'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', +'I','n','s','t','a','l','l','e','r','\\', +'M','a','n','a','g','e','d','\\','%','s','\\', +'I','n','s','t','a','l','l','e','r','\\', +'F','e','a','t','u','r','e','s','\\','%','s',0}; + static const WCHAR szInstaller_ClassesUpgrade_fmt[] = { 'I','n','s','t','a','l','l','e','r','\\', 'U','p','g','r','a','d','e','C','o','d','e','s','\\', @@ -1128,6 +1138,36 @@ UINT MSIREG_OpenLocalManagedProductKey(LPCWSTR szProductCode, HKEY *key, BOOL cr return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key); } +UINT MSIREG_OpenManagedFeaturesKey(LPCWSTR szProductCode, HKEY *key, BOOL create) +{ + WCHAR squished_pc[GUID_SIZE]; + WCHAR keypath[0x200]; + LPWSTR usersid; + UINT r; + + TRACE("%s\n", debugstr_w(szProductCode)); + + if (!squash_guid(szProductCode, squished_pc)) + return ERROR_FUNCTION_FAILED; + + TRACE("squished (%s)\n", debugstr_w(squished_pc)); + + r = get_user_sid(&usersid); + if (r != ERROR_SUCCESS || !usersid) + { + ERR("Failed to retrieve user SID: %d\n", r); + return r; + } + + sprintfW(keypath, szInstaller_LocalManagedFeat_fmt, usersid, squished_pc); + LocalFree(usersid); + + if (create) + return RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key); + + return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key); +} + UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL create) { WCHAR squished_pc[GUID_SIZE]; diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index 1945b44..f094c2d 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -842,10 +842,7 @@ static void test_MsiQueryFeatureState(void) /* feature value exists */ state = MsiQueryFeatureStateA(prodcode, "feature"); - todo_wine - { - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - } + ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); lstrcatA(keypath, usersid); @@ -858,46 +855,31 @@ static void test_MsiQueryFeatureState(void) /* userdata features key exists */ state = MsiQueryFeatureStateA(prodcode, "feature"); - todo_wine - { - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - } + ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaa", 20); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); state = MsiQueryFeatureStateA(prodcode, "feature"); - todo_wine - { - ok(state == INSTALLSTATE_BADCONFIG, "Expected INSTALLSTATE_BADCONFIG, got %d\n", state); - } + ok(state == INSTALLSTATE_BADCONFIG, "Expected INSTALLSTATE_BADCONFIG, got %d\n", state); res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaa", 21); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); state = MsiQueryFeatureStateA(prodcode, "feature"); - todo_wine - { - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - } + ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaaa", 22); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); state = MsiQueryFeatureStateA(prodcode, "feature"); - todo_wine - { - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - } + ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)comp_base85, 21); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); state = MsiQueryFeatureStateA(prodcode, "feature"); - todo_wine - { - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - } + ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); lstrcatA(keypath, usersid); @@ -908,28 +890,19 @@ static void test_MsiQueryFeatureState(void) ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); state = MsiQueryFeatureStateA(prodcode, "feature"); - todo_wine - { - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - } + ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"", 1); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); state = MsiQueryFeatureStateA(prodcode, "feature"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"apple", 1); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); state = MsiQueryFeatureStateA(prodcode, "feature"); - todo_wine - { - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - } + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); RegDeleteValueA(compkey, prod_squashed); RegDeleteKeyA(compkey, "");
1
0
0
0
James Hawkins : msi: Add more tests for MsiQueryFeatureState.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: aefd63dc4e62d4a8f9caa3f2e21c26cae2ffa324 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aefd63dc4e62d4a8f9caa3f2e…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jun 23 23:06:04 2008 -0500 msi: Add more tests for MsiQueryFeatureState. --- dlls/msi/tests/msi.c | 236 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 235 insertions(+), 1 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=aefd63dc4e62d4a8f9caa…
1
0
0
0
James Hawkins : msi: Create the SourceList key in msi_publish_sourcelist.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: 2d4e4b6ae26b867781677e3e6608fde6a968c78c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2d4e4b6ae26b867781677e3e6…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jun 23 23:05:25 2008 -0500 msi: Create the SourceList key in msi_publish_sourcelist. --- dlls/msi/action.c | 22 ++++++++++------------ 1 files changed, 10 insertions(+), 12 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 0573a22..cde5c98 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3339,14 +3339,22 @@ static UINT msi_publish_icons(MSIPACKAGE *package) return ERROR_SUCCESS; } -static UINT msi_publish_sourcelist(MSIPACKAGE *package) +static UINT msi_publish_sourcelist(MSIPACKAGE *package, HKEY hkey) { UINT r; + HKEY source; LPWSTR buffer; MSIMEDIADISK *disk; MSISOURCELISTINFO *info; static const WCHAR szEmpty[] = {0}; + static const WCHAR szSourceList[] = {'S','o','u','r','c','e','L','i','s','t',0}; + + r = RegCreateKeyW(hkey, szSourceList, &source); + if (r != ERROR_SUCCESS) + return r; + + RegCloseKey(source); buffer = strrchrW(package->PackagePath, '\\') + 1; r = MsiSourceListSetInfoW(package->ProductCode, NULL, @@ -3547,10 +3555,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) UINT rc; HKEY hukey=0; HKEY hudkey=0; - HKEY source; - - static const WCHAR szSourceList[] = - {'S','o','u','r','c','e','L','i','s','t',0}; /* FIXME: also need to publish if the product is in advertise mode */ if (!msi_check_publish(package)) @@ -3577,12 +3581,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) goto end; } - rc = RegCreateKeyW(hukey, szSourceList, &source); - if (rc != ERROR_SUCCESS) - goto end; - - RegCloseKey(source); - rc = msi_publish_upgrade_code(package); if (rc != ERROR_SUCCESS) goto end; @@ -3591,7 +3589,7 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) if (rc != ERROR_SUCCESS) goto end; - rc = msi_publish_sourcelist(package); + rc = msi_publish_sourcelist(package, hukey); if (rc != ERROR_SUCCESS) goto end;
1
0
0
0
James Hawkins : msi: Fix the published location of the upgrade code for the machine context.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: 58e15439609415cee972591903074d1cb1978ed6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=58e15439609415cee97259190…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jun 23 23:04:46 2008 -0500 msi: Fix the published location of the upgrade code for the machine context. --- dlls/msi/action.c | 15 ++++++++++++--- dlls/msi/msipriv.h | 1 + dlls/msi/registry.c | 23 +++++++++++++++++++++++ dlls/msi/tests/install.c | 7 ++----- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 955b796..0573a22 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3487,9 +3487,18 @@ static UINT msi_publish_upgrade_code(MSIPACKAGE *package) if (!upgrade) return ERROR_SUCCESS; - r = MSIREG_OpenUserUpgradeCodesKey(upgrade, &hkey, TRUE); - if (r != ERROR_SUCCESS) - goto done; + if (package->Context == MSIINSTALLCONTEXT_MACHINE) + { + r = MSIREG_OpenClassesUpgradeCodesKey(upgrade, &hkey, TRUE); + if (r != ERROR_SUCCESS) + goto done; + } + else + { + r = MSIREG_OpenUserUpgradeCodesKey(upgrade, &hkey, TRUE); + if (r != ERROR_SUCCESS) + goto done; + } squash_guid(package->ProductCode, squashed_pc); msi_reg_set_val_str(hkey, squashed_pc, NULL); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 096bb88..18a029f 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -793,6 +793,7 @@ extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct); extern UINT MSIREG_DeleteLocalUserDataComponentKey(LPCWSTR szComponent); extern UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent); extern UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode); +extern UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL create); extern LPWSTR msi_reg_get_val_str( HKEY hkey, LPCWSTR name ); extern BOOL msi_reg_get_val_dword( HKEY hkey, LPCWSTR name, DWORD *val); diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index 1d308d4..beb98a8 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -220,6 +220,11 @@ static const WCHAR szInstaller_LocalManagedProd_fmt[] = { 'I','n','s','t','a','l','l','e','r','\\', 'P','r','o','d','u','c','t','s','\\','%','s',0}; +static const WCHAR szInstaller_ClassesUpgrade_fmt[] = { +'I','n','s','t','a','l','l','e','r','\\', +'U','p','g','r','a','d','e','C','o','d','e','s','\\', +'%','s',0}; + static const WCHAR localsid[] = {'S','-','1','-','5','-','1','8',0}; BOOL unsquash_guid(LPCWSTR in, LPWSTR out) @@ -1123,6 +1128,24 @@ UINT MSIREG_OpenLocalManagedProductKey(LPCWSTR szProductCode, HKEY *key, BOOL cr return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key); } +UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL create) +{ + WCHAR squished_pc[GUID_SIZE]; + WCHAR keypath[0x200]; + + TRACE("%s\n", debugstr_w(szUpgradeCode)); + if (!squash_guid(szUpgradeCode, squished_pc)) + return ERROR_FUNCTION_FAILED; + TRACE("squished (%s)\n", debugstr_w(squished_pc)); + + sprintfW(keypath, szInstaller_ClassesUpgrade_fmt, squished_pc); + + if (create) + return RegCreateKeyW(HKEY_CLASSES_ROOT, keypath, key); + + return RegOpenKeyW(HKEY_CLASSES_ROOT, keypath, key); +} + /************************************************************************* * MsiDecomposeDescriptorW [MSI.@] * diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 7598023..8fa729a 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2649,12 +2649,9 @@ static void test_publish_publishproduct(void) RegCloseKey(hkey); res = RegOpenKeyA(HKEY_CLASSES_ROOT, machup, &hkey); - todo_wine - { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); - } + CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); RegDeleteKeyA(hkey, ""); RegCloseKey(hkey);
1
0
0
0
James Hawkins : msi: Open the local user data product key for the machine context.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: 301f2a5eae6fce37e0c9fffd742bfc84466db8d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=301f2a5eae6fce37e0c9fffd7…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jun 23 23:04:04 2008 -0500 msi: Open the local user data product key for the machine context. --- dlls/msi/action.c | 16 +++++++++------- dlls/msi/msipriv.h | 1 + dlls/msi/registry.c | 18 ++++++++++++++++++ dlls/msi/tests/install.c | 10 ++-------- 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 6761b39..955b796 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3547,17 +3547,23 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) if (!msi_check_publish(package)) return ERROR_SUCCESS; - /* ok there is a lot more done here but i need to figure out what */ - if (package->Context == MSIINSTALLCONTEXT_MACHINE) { rc = MSIREG_OpenLocalClassesProductKey(package->ProductCode, &hukey, TRUE); if (rc != ERROR_SUCCESS) goto end; + + rc = MSIREG_OpenLocalUserDataProductKey(package->ProductCode, &hudkey, TRUE); + if (rc != ERROR_SUCCESS) + goto end; } else { - rc = MSIREG_OpenUserProductsKey(package->ProductCode,&hukey,TRUE); + rc = MSIREG_OpenUserProductsKey(package->ProductCode, &hukey, TRUE); + if (rc != ERROR_SUCCESS) + goto end; + + rc = MSIREG_OpenUserDataProductKey(package->ProductCode, &hudkey, TRUE); if (rc != ERROR_SUCCESS) goto end; } @@ -3568,10 +3574,6 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) RegCloseKey(source); - rc = MSIREG_OpenUserDataProductKey(package->ProductCode,&hudkey,TRUE); - if (rc != ERROR_SUCCESS) - goto end; - rc = msi_publish_upgrade_code(package); if (rc != ERROR_SUCCESS) goto end; diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index e2c18e4..096bb88 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -773,6 +773,7 @@ extern UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL extern UINT MSIREG_OpenProductsKey(LPCWSTR szProduct, HKEY* key, BOOL create); extern UINT MSIREG_OpenPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create); extern UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, HKEY* key, BOOL create); +extern UINT MSIREG_OpenLocalUserDataProductKey(LPCWSTR szProduct, HKEY* key, BOOL create); extern UINT MSIREG_OpenCurrentUserInstallProps(LPCWSTR szProduct, HKEY* key, BOOL create); extern UINT MSIREG_OpenLocalSystemInstallProps(LPCWSTR szProduct, HKEY* key, BOOL create); extern UINT MSIREG_OpenUserFeaturesKey(LPCWSTR szProduct, HKEY* key, BOOL create); diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index c3d425d..1d308d4 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -809,6 +809,24 @@ UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, HKEY *key, BOOL create) return rc; } +UINT MSIREG_OpenLocalUserDataProductKey(LPCWSTR szProduct, HKEY *key, BOOL create) +{ + WCHAR squished_pc[GUID_SIZE]; + WCHAR keypath[0x200]; + + TRACE("%s\n", debugstr_w(szProduct)); + if (!squash_guid(szProduct, squished_pc)) + return ERROR_FUNCTION_FAILED; + TRACE("squished (%s)\n", debugstr_w(squished_pc)); + + sprintfW(keypath, szUserDataProd_fmt, localsid, squished_pc); + + if (create) + return RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key); + + return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key); +} + static UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, LPCWSTR szUserSID, HKEY *key, BOOL create) { diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 23e0c76..7598023 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2589,16 +2589,10 @@ static void test_publish_publishproduct(void) sprintf(keypath, prodpath, "S-1-5-18"); res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey); - todo_wine - { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - } + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); res = RegOpenKeyA(hkey, "InstallProperties", &props); - todo_wine - { - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - } + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); res = RegOpenKeyA(hkey, "Patches", &patches); todo_wine
1
0
0
0
James Hawkins : msi: Test the PublishProduct action with the machine context.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: e6d126cd4927f18f2dec5e65c4414ed06a90b916 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6d126cd4927f18f2dec5e65c…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jun 23 23:03:29 2008 -0500 msi: Test the PublishProduct action with the machine context. --- dlls/msi/tests/install.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 89 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 773eaaf..23e0c76 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2481,6 +2481,8 @@ static void test_publish_publishproduct(void) static const CHAR badprod[] = "Software\\Microsoft\\Windows\\CurrentVersion" "\\Installer\\Products" "\\84A88FD7F6998CE40A22FB59F6B9C2BB"; + static const CHAR machprod[] = "Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB"; + static const CHAR machup[] = "Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2"; get_user_sid(&usersid); if (!usersid) @@ -2576,6 +2578,93 @@ static void test_publish_publishproduct(void) RegDeleteKeyA(hkey, ""); RegCloseKey(hkey); + /* PublishProduct, machine */ + r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1 ALLUSERS=1"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); + ok(delete_pf("msitest", FALSE), "File not installed\n"); + + res = RegOpenKeyA(HKEY_LOCAL_MACHINE, badprod, &hkey); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + + sprintf(keypath, prodpath, "S-1-5-18"); + res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey); + todo_wine + { + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + } + + res = RegOpenKeyA(hkey, "InstallProperties", &props); + todo_wine + { + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + } + + res = RegOpenKeyA(hkey, "Patches", &patches); + todo_wine + { + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + CHECK_DEL_REG_STR(patches, "AllPatches", NULL); + } + + RegDeleteKeyA(patches, ""); + RegCloseKey(patches); + RegDeleteKeyA(hkey, ""); + RegCloseKey(hkey); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, machprod, &hkey); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST"); + CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052c94DA02821EECD05F2F"); + CHECK_DEL_REG_DWORD(hkey, "Language", 1033); + CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001); + CHECK_DEL_REG_DWORD(hkey, "AuthorizedLUAApp", 0); + todo_wine CHECK_DEL_REG_DWORD(hkey, "Assignment", 1); + CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184); + CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0); + CHECK_DEL_REG_STR(hkey, "Clients", ":"); + + res = RegOpenKeyA(hkey, "SourceList", &sourcelist); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + lstrcpyA(path, "n;1;"); + lstrcatA(path, temp); + CHECK_DEL_REG_STR(sourcelist, "LastUsedSource", path); + CHECK_DEL_REG_STR(sourcelist, "PackageName", "msitest.msi"); + + res = RegOpenKeyA(sourcelist, "Net", &net); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + CHECK_DEL_REG_STR(net, "1", temp); + + RegDeleteKeyA(net, ""); + RegCloseKey(net); + + res = RegOpenKeyA(sourcelist, "Media", &media); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + CHECK_DEL_REG_STR(media, "1", "DISK1;"); + + RegDeleteKeyA(media, ""); + RegCloseKey(media); + RegDeleteKeyA(sourcelist, ""); + RegCloseKey(sourcelist); + RegDeleteKeyA(hkey, ""); + RegCloseKey(hkey); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, machup, &hkey); + todo_wine + { + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); + } + + RegDeleteKeyA(hkey, ""); + RegCloseKey(hkey); + DeleteFile(msifile); DeleteFile("msitest\\maximus"); RemoveDirectory("msitest");
1
0
0
0
James Hawkins : msi: Publish the UpgradeCode in PublishProduct.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: cdb33f8a39573102c8265dbc986efc86ae503c53 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cdb33f8a39573102c8265dbc9…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jun 23 23:02:54 2008 -0500 msi: Publish the UpgradeCode in PublishProduct. --- dlls/msi/action.c | 68 ++++++++++++++++++++++++++++++++++--------- dlls/msi/msipriv.h | 1 + dlls/msi/registry.c | 15 +++++++++ dlls/msi/tests/automation.c | 5 +-- dlls/msi/tests/install.c | 7 +--- 5 files changed, 73 insertions(+), 23 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 33ce25c..6761b39 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3473,6 +3473,34 @@ done: return ERROR_SUCCESS; } +static UINT msi_publish_upgrade_code(MSIPACKAGE *package) +{ + UINT r; + HKEY hkey; + LPWSTR upgrade; + WCHAR squashed_pc[SQUISH_GUID_SIZE]; + + static const WCHAR szUpgradeCode[] = + {'U','p','g','r','a','d','e','C','o','d','e',0}; + + upgrade = msi_dup_property(package, szUpgradeCode); + if (!upgrade) + return ERROR_SUCCESS; + + r = MSIREG_OpenUserUpgradeCodesKey(upgrade, &hkey, TRUE); + if (r != ERROR_SUCCESS) + goto done; + + squash_guid(package->ProductCode, squashed_pc); + msi_reg_set_val_str(hkey, squashed_pc, NULL); + + RegCloseKey(hkey); + +done: + msi_free(upgrade); + return r; +} + static BOOL msi_check_publish(MSIPACKAGE *package) { MSIFEATURE *feature; @@ -3486,6 +3514,19 @@ static BOOL msi_check_publish(MSIPACKAGE *package) return FALSE; } +static BOOL msi_check_unpublish(MSIPACKAGE *package) +{ + MSIFEATURE *feature; + + LIST_FOR_EACH_ENTRY(feature, &package->features, MSIFEATURE, entry) + { + if (feature->ActionRequest != INSTALLSTATE_ABSENT) + return FALSE; + } + + return TRUE; +} + /* * 99% of the work done here is only done for * advertised installs. However this is where the @@ -3531,7 +3572,9 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) if (rc != ERROR_SUCCESS) goto end; - /* FIXME: Need to write more keys to the user registry */ + rc = msi_publish_upgrade_code(package); + if (rc != ERROR_SUCCESS) + goto end; rc = msi_publish_product_properties(package, hukey); if (rc != ERROR_SUCCESS) @@ -3895,19 +3938,6 @@ static UINT msi_unpublish_feature(MSIPACKAGE *package, MSIFEATURE *feature) return ERROR_SUCCESS; } -static BOOL msi_check_unpublish(MSIPACKAGE *package) -{ - MSIFEATURE *feature; - - LIST_FOR_EACH_ENTRY(feature, &package->features, MSIFEATURE, entry) - { - if (feature->ActionRequest != INSTALLSTATE_ABSENT) - return FALSE; - } - - return TRUE; -} - static UINT ACTION_UnpublishFeatures(MSIPACKAGE *package) { MSIFEATURE *feature; @@ -4152,6 +4182,7 @@ static UINT ACTION_InstallExecute(MSIPACKAGE *package) static UINT msi_unpublish_product(MSIPACKAGE *package) { + LPWSTR upgrade; LPWSTR remove = NULL; LPWSTR *features = NULL; BOOL full_uninstall = TRUE; @@ -4159,6 +4190,8 @@ static UINT msi_unpublish_product(MSIPACKAGE *package) static const WCHAR szRemove[] = {'R','E','M','O','V','E',0}; static const WCHAR szAll[] = {'A','L','L',0}; + static const WCHAR szUpgradeCode[] = + {'U','p','g','r','a','d','e','C','o','d','e',0}; remove = msi_dup_property(package, szRemove); if (!remove) @@ -4192,6 +4225,13 @@ static UINT msi_unpublish_product(MSIPACKAGE *package) MSIREG_DeleteUserFeaturesKey(package->ProductCode); MSIREG_DeleteUninstallKey(package->ProductCode); + upgrade = msi_dup_property(package, szUpgradeCode); + if (upgrade) + { + MSIREG_DeleteUserUpgradeCodesKey(upgrade); + msi_free(upgrade); + } + done: msi_free(remove); msi_free(features); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index b045710..e2c18e4 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -791,6 +791,7 @@ extern UINT MSIREG_OpenLocalUserDataFeaturesKey(LPCWSTR szProduct, HKEY *key, BO extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct); extern UINT MSIREG_DeleteLocalUserDataComponentKey(LPCWSTR szComponent); extern UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent); +extern UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode); extern LPWSTR msi_reg_get_val_str( HKEY hkey, LPCWSTR name ); extern BOOL msi_reg_get_val_dword( HKEY hkey, LPCWSTR name, DWORD *val); diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index 7b586a8..c3d425d 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -980,6 +980,21 @@ UINT MSIREG_OpenUserUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL creat return rc; } +UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode) +{ + WCHAR squished_pc[GUID_SIZE]; + WCHAR keypath[0x200]; + + TRACE("%s\n",debugstr_w(szUpgradeCode)); + if (!squash_guid(szUpgradeCode,squished_pc)) + return ERROR_FUNCTION_FAILED; + TRACE("squished (%s)\n", debugstr_w(squished_pc)); + + sprintfW(keypath,szInstaller_UserUpgradeCodes_fmt,squished_pc); + + return RegDeleteTreeW(HKEY_CURRENT_USER, keypath); +} + UINT MSIREG_OpenLocalSystemProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create) { WCHAR squished_pc[GUID_SIZE]; diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index ec54065..68b0f75 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -2301,10 +2301,7 @@ static void test_Installer_InstallProduct(void) ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); res = RegDeleteKeyA(hkey, "UpgradeCodes\\D8E760ECA1E276347B43E42BDBDA5656"); - todo_wine - { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - } + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); RegCloseKey(hkey); diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 7778a96..773eaaf 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2569,12 +2569,9 @@ static void test_publish_publishproduct(void) RegCloseKey(hkey); res = RegOpenKeyA(HKEY_CURRENT_USER, cuupgrades, &hkey); - todo_wine - { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); - } + CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); RegDeleteKeyA(hkey, ""); RegCloseKey(hkey);
1
0
0
0
James Hawkins : msi: Publish media disks whether the drive type is removable or not.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: 5538fa0290cf9f96c06c9289d41c758c78a9932c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5538fa0290cf9f96c06c9289d…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jun 23 23:02:16 2008 -0500 msi: Publish media disks whether the drive type is removable or not. --- dlls/msi/files.c | 7 +++---- dlls/msi/tests/install.c | 5 +---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dlls/msi/files.c b/dlls/msi/files.c index 64869b1..c6e70d9 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -544,10 +544,9 @@ UINT msi_load_media_info(MSIPACKAGE *package, MSIFILE *file, MSIMEDIAINFO *mi) options |= MSISOURCETYPE_NETWORK; } - if (mi->type == DRIVE_CDROM || mi->type == DRIVE_REMOVABLE) - msi_package_add_media_disk(package, package->Context, - MSICODE_PRODUCT, mi->disk_id, - mi->volume_label, mi->disk_prompt); + msi_package_add_media_disk(package, package->Context, + MSICODE_PRODUCT, mi->disk_id, + mi->volume_label, mi->disk_prompt); msi_package_add_info(package, package->Context, options, INSTALLPROPERTY_LASTUSEDSOURCEW, source); diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index c48ac8e..7778a96 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2559,10 +2559,7 @@ static void test_publish_publishproduct(void) res = RegOpenKeyA(sourcelist, "Media", &media); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - todo_wine - { - CHECK_DEL_REG_STR(media, "1", "DISK1;"); - } + CHECK_DEL_REG_STR(media, "1", "DISK1;"); RegDeleteKeyA(media, ""); RegCloseKey(media);
1
0
0
0
James Hawkins : msi: Publish a few more product properties.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: ef640a6cd5de0d4d9b3a61513a93c44a4739246d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef640a6cd5de0d4d9b3a61513…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jun 23 23:01:44 2008 -0500 msi: Publish a few more product properties. --- dlls/msi/action.c | 12 ++++++++++++ dlls/msi/tests/install.c | 11 ++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 751c8aa..33ce25c 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3405,6 +3405,13 @@ static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey) {'A','R','P','P','R','O','D','U','C','T','I','C','O','N',0}; static const WCHAR szProductVersion[] = {'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0}; + static const WCHAR szAssignment[] = + {'A','s','s','i','g','n','m','e','n','t',0}; + static const WCHAR szAdvertiseFlags[] = + {'A','d','v','e','r','t','i','s','e','F','l','a','g','s',0}; + static const WCHAR szClients[] = + {'C','l','i','e','n','t','s',0}; + static const WCHAR szColon[] = {':',0}; buffer = msi_dup_property(package, INSTALLPROPERTY_PRODUCTNAMEW); msi_reg_set_val_str(hkey, INSTALLPROPERTY_PRODUCTNAMEW, buffer); @@ -3436,6 +3443,11 @@ static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey) msi_free(buffer); } + msi_reg_set_val_dword(hkey, szAssignment, 0); + msi_reg_set_val_dword(hkey, szAdvertiseFlags, 0x184); + msi_reg_set_val_dword(hkey, INSTALLPROPERTY_INSTANCETYPEW, 0); + msi_reg_set_val_str(hkey, szClients, szColon); + hdb = alloc_msihandle(&package->db->hdr); if (!hdb) return ERROR_NOT_ENOUGH_MEMORY; diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 581c50e..c48ac8e 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2535,13 +2535,10 @@ static void test_publish_publishproduct(void) CHECK_DEL_REG_DWORD(hkey, "Language", 1033); CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001); CHECK_DEL_REG_DWORD(hkey, "AuthorizedLUAApp", 0); - todo_wine - { - CHECK_DEL_REG_DWORD(hkey, "Assignment", 0); - CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184); - CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0); - CHECK_DEL_REG_STR(hkey, "Clients", ":"); - } + CHECK_DEL_REG_DWORD(hkey, "Assignment", 0); + CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184); + CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0); + CHECK_DEL_REG_STR(hkey, "Clients", ":"); res = RegOpenKeyA(hkey, "SourceList", &sourcelist); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
1
0
0
0
James Hawkins : msi: Allow checking a REG_MULTI_SZ string.
by Alexandre Julliard
24 Jun '08
24 Jun '08
Module: wine Branch: master Commit: c7ab4fad085b972616d541d63e3fe5a392d0527a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7ab4fad085b972616d541d63…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jun 23 23:01:08 2008 -0500 msi: Allow checking a REG_MULTI_SZ string. --- dlls/msi/tests/install.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 235a49a..581c50e 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2154,7 +2154,8 @@ static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase val[0] = '\0'; res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)val, &size); - if (res != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ)) + if (res != ERROR_SUCCESS || + (type != REG_SZ && type != REG_EXPAND_SZ && type != REG_MULTI_SZ)) { ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n"); return;
1
0
0
0
← Newer
1
...
29
30
31
32
33
34
35
...
95
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Results per page:
10
25
50
100
200