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
Jon Griffiths : include/rpcproxy.h: Fix incorrect include guard comment.
by Alexandre Julliard
18 Jun '08
18 Jun '08
Module: wine Branch: master Commit: ff30321e098c4a046045e268572869c9ae952743 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ff30321e098c4a046045e2685…
Author: Jon Griffiths <jon_p_griffiths(a)yahoo.com> Date: Wed Jun 11 14:16:23 2008 -0700 include/rpcproxy.h: Fix incorrect include guard comment. --- include/rpcproxy.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/rpcproxy.h b/include/rpcproxy.h index 7bec080..acddc72 100644 --- a/include/rpcproxy.h +++ b/include/rpcproxy.h @@ -363,4 +363,4 @@ RPCRTAPI HRESULT RPC_ENTRY } #endif -#endif /*__WINE_RPCDCE_H */ +#endif /*__WINE_RPCPROXY_H */
1
0
0
0
Jon Griffiths : include/msvcrt: Wrap remaining msvcrt headers for C++ compilation.
by Alexandre Julliard
18 Jun '08
18 Jun '08
Module: wine Branch: master Commit: 7d39c97e5fb168f7fdcc150b8eba3ddd1164e061 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d39c97e5fb168f7fdcc150b8…
Author: Jon Griffiths <jon_p_griffiths(a)yahoo.com> Date: Wed Jun 11 14:08:19 2008 -0700 include/msvcrt: Wrap remaining msvcrt headers for C++ compilation. --- include/msvcrt/crtdbg.h | 8 ++++++++ include/msvcrt/signal.h | 8 ++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/include/msvcrt/crtdbg.h b/include/msvcrt/crtdbg.h index 3b2f112..a4393a9 100644 --- a/include/msvcrt/crtdbg.h +++ b/include/msvcrt/crtdbg.h @@ -77,6 +77,10 @@ typedef struct _CrtMemState #define _CrtDbgBreak() ((void)0) #endif +#ifdef __cplusplus +extern "C" { +#endif + extern int _crtAssertBusy; extern int _crtBreakAlloc; extern int _crtDbgFlag; @@ -90,6 +94,10 @@ int _CrtSetDbgFlag(int new); void *_CrtSetDumpClient(void *dumpClient); int _CrtSetReportMode(int reportType, int reportMode); +#ifdef __cplusplus +} +#endif + #endif /* _DEBUG */ #define _CrtDoForAllClientObjects(f,c) ((void)0) diff --git a/include/msvcrt/signal.h b/include/msvcrt/signal.h index 5a77a00..2155bb4 100644 --- a/include/msvcrt/signal.h +++ b/include/msvcrt/signal.h @@ -33,6 +33,10 @@ #define NSIG (SIGABRT + 1) +#ifdef __cplusplus +extern "C" { +#endif + typedef void (*__sighandler_t)(int); #define SIG_DFL ((__sighandler_t)0) @@ -42,4 +46,8 @@ typedef void (*__sighandler_t)(int); __sighandler_t signal(int sig, __sighandler_t func); int raise(int sig); +#ifdef __cplusplus +} +#endif + #endif /* _WINE_SIGNAL_H */
1
0
0
0
Jon Griffiths : tapi.h: Fix struct member names.
by Alexandre Julliard
18 Jun '08
18 Jun '08
Module: wine Branch: master Commit: c5bedbf69e1ad9f5783f9c66bcd5052fd37e3c88 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c5bedbf69e1ad9f5783f9c66b…
Author: Jon Griffiths <jon_p_griffiths(a)yahoo.com> Date: Wed Jun 11 13:47:06 2008 -0700 tapi.h: Fix struct member names. --- include/tapi.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tapi.h b/include/tapi.h index 9c5dc49..851317f 100644 --- a/include/tapi.h +++ b/include/tapi.h @@ -589,9 +589,9 @@ typedef struct linedevstatus_tag { DWORD dwOpenMediaModes; DWORD dwNumActiveCalls; DWORD dwNumOnHoldCalls; - DWORD dwNumOnHoldPendingCalls; + DWORD dwNumOnHoldPendCalls; DWORD dwLineFeatures; - DWORD dwNumCallCompletion; + DWORD dwNumCallCompletions; DWORD dwRingMode; DWORD dwSignalLevel; DWORD dwBatteryLevel;
1
0
0
0
James Hawkins : msi: Don't publish features to an invalid location.
by Alexandre Julliard
18 Jun '08
18 Jun '08
Module: wine Branch: master Commit: af56e28f7e5e9d4ed635957f283a7d00a3da092e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af56e28f7e5e9d4ed635957f2…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Jun 18 00:55:09 2008 -0500 msi: Don't publish features to an invalid location. --- dlls/msi/action.c | 7 ------- dlls/msi/tests/install.c | 8 +------- 2 files changed, 1 insertions(+), 14 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index fa5900c..d3aeb38 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3733,17 +3733,12 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) { MSIFEATURE *feature; UINT rc; - HKEY hkey=0; HKEY hukey=0; HKEY userdata=0; if (!msi_check_publish(package)) return ERROR_SUCCESS; - rc = MSIREG_OpenFeaturesKey(package->ProductCode,&hkey,TRUE); - if (rc != ERROR_SUCCESS) - goto end; - rc = MSIREG_OpenUserFeaturesKey(package->ProductCode,&hukey,TRUE); if (rc != ERROR_SUCCESS) goto end; @@ -3801,7 +3796,6 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) strcatW(data,feature->Feature_Parent); } - msi_reg_set_val_str( hkey, feature->Feature, data ); msi_reg_set_val_str( userdata, feature->Feature, data ); msi_free(data); @@ -3837,7 +3831,6 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) } end: - RegCloseKey(hkey); RegCloseKey(hukey); return rc; } diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 84ffdb6..9a952d3 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2522,13 +2522,7 @@ static void test_publish_publishfeatures(void) ok(delete_pf("msitest", FALSE), "File not installed\n"); res = RegOpenKeyA(HKEY_LOCAL_MACHINE, featkey, &hkey); - todo_wine - { - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - } - - if (res == ERROR_SUCCESS) - RegCloseKey(hkey); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
1
0
0
0
James Hawkins : msi: Rewrite the PublishFeatures test to only check the registry changes.
by Alexandre Julliard
18 Jun '08
18 Jun '08
Module: wine Branch: master Commit: d8e4258d08d32c28a010d3aee21fc43d9a793a02 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d8e4258d08d32c28a010d3aee…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Jun 18 00:54:24 2008 -0500 msi: Rewrite the PublishFeatures test to only check the registry changes. --- dlls/msi/tests/install.c | 131 ++++++++++++++-------------------------------- 1 files changed, 40 insertions(+), 91 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 233080b..84ffdb6 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2489,21 +2489,25 @@ static void test_publish_publishfeatures(void) { UINT r; LONG res; - HKEY uninstall, prodkey; - INSTALLSTATE state; - CHAR prodcode[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"; + HKEY hkey; + LPSTR usersid; + CHAR keypath[MAX_PATH]; - static const CHAR subkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; + static const CHAR cupath[] = "Software\\Microsoft\\Installer\\Features" + "\\84A88FD7F6998CE40A22FB59F6B9C2BB"; + static const CHAR udpath[] = "Software\\Microsoft\\Windows\\CurrentVersion" + "\\Installer\\UserData\\%s\\Products" + "\\84A88FD7F6998CE40A22FB59F6B9C2BB\\Features"; + static const CHAR featkey[] = "Software\\Microsoft\\Windows\\CurrentVersion" + "\\Installer\\Features"; - if (!pMsiQueryComponentStateA) + get_user_sid(&usersid); + if (!usersid) { - skip("MsiQueryComponentStateA is not available\n"); + skip("ConvertSidToStringSidA is not available\n"); return; } - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, subkey, &uninstall); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CreateDirectoryA("msitest", NULL); create_file("msitest\\maximus", 500); @@ -2511,103 +2515,48 @@ static void test_publish_publishfeatures(void) MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL); - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - /* PublishFeatures */ + /* PublishFeatures, current user */ r = MsiInstallProductA(msifile, "PUBLISH_FEATURES=1"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); + ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); + ok(delete_pf("msitest", FALSE), "File not installed\n"); - /* try to uninstall after PublishFeatures */ - r = MsiInstallProductA(msifile, "REMOVE=ALL"); + res = RegOpenKeyA(HKEY_LOCAL_MACHINE, featkey, &hkey); todo_wine { - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); } - ok(pf_exists("msitest\\maximus"), "File deleted\n"); - ok(pf_exists("msitest"), "File deleted\n"); - - /* PublishFeatures and PublishProduct */ - r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1 PUBLISH_FEATURES=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); + if (res == ERROR_SUCCESS) + RegCloseKey(hkey); - /* PublishFeatures and RegisterProduct */ - r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 PUBLISH_FEATURES=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); + res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); + CHECK_REG_STR(hkey, "feature", ""); + CHECK_REG_STR(hkey, "montecristo", ""); - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); + RegDeleteValueA(hkey, "feature"); + RegDeleteValueA(hkey, "montecristo"); + RegDeleteKeyA(hkey, ""); + RegCloseKey(hkey); - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); + sprintf(keypath, udpath, usersid); + res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); + CHECK_REG_STR(hkey, "feature", "VGtfp^p+,?82@JU1j_KE"); + CHECK_REG_STR(hkey, "montecristo", "VGtfp^p+,?82@JU1j_KE"); - /* full install to remove */ - r = MsiInstallProductA(msifile, "FULL=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + RegDeleteValueA(hkey, "feature"); + RegDeleteValueA(hkey, "montecristo"); + RegDeleteKeyA(hkey, ""); + RegCloseKey(hkey); - RegCloseKey(uninstall); DeleteFile(msifile); DeleteFile("msitest\\maximus"); RemoveDirectory("msitest"); - delete_pfmsitest_files(); + HeapFree(GetProcessHeap(), 0, usersid); } static LPSTR reg_get_val_str(HKEY hkey, LPCSTR name)
1
0
0
0
James Hawkins : msi: Fix the RegisterUser action to handle the package context.
by Alexandre Julliard
18 Jun '08
18 Jun '08
Module: wine Branch: master Commit: 5f46dfd698e09eda8f29fa5d42e7b524f9d7214b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f46dfd698e09eda8f29fa5d4…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Jun 18 00:53:39 2008 -0500 msi: Fix the RegisterUser action to handle the package context. --- dlls/msi/action.c | 6 +++++- dlls/msi/tests/install.c | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 30bb7cf..fa5900c 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -4348,7 +4348,11 @@ static UINT ACTION_RegisterUser(MSIPACKAGE *package) if (!productid) return ERROR_SUCCESS; - rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &hkey, TRUE); + if (package->Context == MSIINSTALLCONTEXT_MACHINE) + rc = MSIREG_OpenLocalSystemInstallProps(package->ProductCode, &hkey, TRUE); + else + rc = MSIREG_OpenCurrentUserInstallProps(package->ProductCode, &hkey, TRUE); + if (rc != ERROR_SUCCESS) goto end; diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index b066e5b..233080b 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2719,6 +2719,27 @@ static void test_publish_registeruser(void) RegDeleteKeyA(props, ""); RegCloseKey(props); + /* RegisterUser, machine */ + r = MsiInstallProductA(msifile, "REGISTER_USER=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"); + + sprintf(keypath, keyfmt, "S-1-5-18"); + + res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &props); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + CHECK_REG_STR(props, "ProductID", "none"); + CHECK_REG_STR(props, "RegCompany", company); + CHECK_REG_STR(props, "RegOwner", owner); + + RegDeleteValueA(props, "ProductID"); + RegDeleteValueA(props, "RegCompany"); + RegDeleteValueA(props, "RegOwner"); + RegDeleteKeyA(props, ""); + RegCloseKey(props); + HeapFree(GetProcessHeap(), 0, company); HeapFree(GetProcessHeap(), 0, owner);
1
0
0
0
James Hawkins : msi: Rewrite the RegisterUser test to only check the registry changes.
by Alexandre Julliard
18 Jun '08
18 Jun '08
Module: wine Branch: master Commit: 79d0c3719f8c4a690fac6c6a0dd0d1868c231334 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79d0c3719f8c4a690fac6c6a0…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Jun 18 00:51:57 2008 -0500 msi: Rewrite the RegisterUser test to only check the registry changes. --- dlls/msi/tests/install.c | 205 ++++++++++++++++++++++++---------------------- 1 files changed, 107 insertions(+), 98 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index bf329a1..b066e5b 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1167,6 +1167,27 @@ static void init_functionpointers(void) #undef GET_PROC } +static void get_user_sid(LPSTR *usersid) +{ + HANDLE token; + BYTE buf[1024]; + DWORD size; + PTOKEN_USER user; + HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); + static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*); + + *usersid = NULL; + pConvertSidToStringSidA = (void *)GetProcAddress(hadvapi32, "ConvertSidToStringSidA"); + if (!pConvertSidToStringSidA) + return; + + OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); + size = sizeof(buf); + GetTokenInformation(token, TokenUser, (void *)buf, size, &size); + user = (PTOKEN_USER)buf; + pConvertSidToStringSidA(user->User.Sid, usersid); +} + static BOOL check_record(MSIHANDLE rec, UINT field, LPCSTR val) { CHAR buffer[0x20]; @@ -2589,24 +2610,86 @@ static void test_publish_publishfeatures(void) delete_pfmsitest_files(); } +static LPSTR reg_get_val_str(HKEY hkey, LPCSTR name) +{ + DWORD len = 0; + LPSTR val; + LONG r; + + r = RegQueryValueExA(hkey, name, NULL, NULL, NULL, &len); + if (r != ERROR_SUCCESS) + return NULL; + + len += sizeof (WCHAR); + val = HeapAlloc(GetProcessHeap(), 0, len); + if (!val) return NULL; + val[0] = 0; + RegQueryValueExA(hkey, name, NULL, NULL, (LPBYTE)val, &len); + return val; +} + +static void get_owner_company(LPSTR *owner, LPSTR *company) +{ + LONG res; + HKEY hkey; + + *owner = *company = NULL; + + res = RegOpenKeyA(HKEY_CURRENT_USER, + "Software\\Microsoft\\MS Setup (ACME)\\User Info", &hkey); + if (res == ERROR_SUCCESS) + { + *owner = reg_get_val_str(hkey, "DefName"); + *company = reg_get_val_str(hkey, "DefCompany"); + RegCloseKey(hkey); + } + + if (!*owner || !*company) + { + res = RegOpenKeyA(HKEY_LOCAL_MACHINE, + "Software\\Microsoft\\Windows\\CurrentVersion", &hkey); + if (res == ERROR_SUCCESS) + { + *owner = reg_get_val_str(hkey, "RegisteredOwner"); + *company = reg_get_val_str(hkey, "RegisteredOrganization"); + RegCloseKey(hkey); + } + } + + if (!*owner || !*company) + { + res = RegOpenKeyA(HKEY_LOCAL_MACHINE, + "Software\\Microsoft\\Windows NT\\CurrentVersion", &hkey); + if (res == ERROR_SUCCESS) + { + *owner = reg_get_val_str(hkey, "RegisteredOwner"); + *company = reg_get_val_str(hkey, "RegisteredOrganization"); + RegCloseKey(hkey); + } + } +} + static void test_publish_registeruser(void) { UINT r; LONG res; - HKEY uninstall, prodkey; - INSTALLSTATE state; - CHAR prodcode[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"; + HKEY props; + LPSTR usersid; + LPSTR owner, company; + CHAR keypath[MAX_PATH]; - static const CHAR subkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; + static const CHAR keyfmt[] = + "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\" + "UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB\\InstallProperties"; - if (!pMsiQueryComponentStateA) + get_user_sid(&usersid); + if (!usersid) { - skip("MsiQueryComponentStateA is not available\n"); + skip("ConvertSidToStringSidA is not available\n"); return; } - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, subkey, &uninstall); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + get_owner_company(&owner, &company); CreateDirectoryA("msitest", NULL); create_file("msitest\\maximus", 500); @@ -2615,107 +2698,33 @@ static void test_publish_registeruser(void) MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL); - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - /* RegisterUser */ + /* RegisterUser, per-user */ r = MsiInstallProductA(msifile, "REGISTER_USER=1"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - todo_wine - { - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - } - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - /* try to uninstall after RegisterUser */ - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - todo_wine - { - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - } - ok(pf_exists("msitest\\maximus"), "File deleted\n"); - ok(pf_exists("msitest"), "File deleted\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); + ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); + ok(delete_pf("msitest", FALSE), "File not installed\n"); - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); + sprintf(keypath, keyfmt, usersid); - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); + res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &props); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); + CHECK_REG_STR(props, "ProductID", "none"); + CHECK_REG_STR(props, "RegCompany", company); + CHECK_REG_STR(props, "RegOwner", owner); - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + RegDeleteValueA(props, "ProductID"); + RegDeleteValueA(props, "RegCompany"); + RegDeleteValueA(props, "RegOwner"); + RegDeleteKeyA(props, ""); + RegCloseKey(props); - /* full install to remove */ - r = MsiInstallProductA(msifile, "FULL=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + HeapFree(GetProcessHeap(), 0, company); + HeapFree(GetProcessHeap(), 0, owner); - RegCloseKey(uninstall); DeleteFile(msifile); DeleteFile("msitest\\maximus"); RemoveDirectory("msitest"); - delete_pfmsitest_files(); -} - -static void get_user_sid(LPSTR *usersid) -{ - HANDLE token; - BYTE buf[1024]; - DWORD size; - PTOKEN_USER user; - HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); - static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*); - - *usersid = NULL; - pConvertSidToStringSidA = (void *)GetProcAddress(hadvapi32, "ConvertSidToStringSidA"); - if (!pConvertSidToStringSidA) - return; - - OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); - size = sizeof(buf); - GetTokenInformation(token, TokenUser, (void *)buf, size, &size); - user = (PTOKEN_USER)buf; - pConvertSidToStringSidA(user->User.Sid, usersid); } static void test_publish_processcomponents(void)
1
0
0
0
James Hawkins : msi: Fix the ProcessComponents action to handle the package context.
by Alexandre Julliard
18 Jun '08
18 Jun '08
Module: wine Branch: master Commit: 288af81a7cd8e3a809160259e8f1aec8d54a2cef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=288af81a7cd8e3a809160259e…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Jun 18 00:51:13 2008 -0500 msi: Fix the ProcessComponents action to handle the package context. --- dlls/msi/action.c | 13 +++++++++++-- dlls/msi/msipriv.h | 2 ++ dlls/msi/registry.c | 36 ++++++++++++++++++++++++++++++++++-- dlls/msi/tests/install.c | 25 +++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 4 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index ca7da98..30bb7cf 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -2886,7 +2886,11 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) if (!comp->FullKeypath) continue; - rc = MSIREG_OpenUserDataComponentKey(comp->ComponentId, &hkey, TRUE); + if (package->Context == MSIINSTALLCONTEXT_MACHINE) + rc = MSIREG_OpenLocalUserDataComponentKey(comp->ComponentId, &hkey, TRUE); + else + rc = MSIREG_OpenUserDataComponentKey(comp->ComponentId, &hkey, TRUE); + if (rc != ERROR_SUCCESS) continue; @@ -2904,7 +2908,12 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) RegCloseKey(hkey); } else if (ACTION_VerifyComponentForAction(comp, INSTALLSTATE_ABSENT)) - MSIREG_DeleteUserDataComponentKey(comp->ComponentId); + { + if (package->Context == MSIINSTALLCONTEXT_MACHINE) + MSIREG_DeleteLocalUserDataComponentKey(comp->ComponentId); + else + MSIREG_DeleteUserDataComponentKey(comp->ComponentId); + } /* UI stuff */ uirow = MSI_CreateRecord(3); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 6dcd267..0982065 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -768,6 +768,7 @@ extern UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create); extern UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, HKEY* key, BOOL create); extern UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create); extern UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create); +extern UINT MSIREG_OpenLocalUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create); extern UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create); extern UINT MSIREG_OpenProductsKey(LPCWSTR szProduct, HKEY* key, BOOL create); extern UINT MSIREG_OpenPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create); @@ -786,6 +787,7 @@ extern UINT MSIREG_OpenLocalSystemComponentKey(LPCWSTR szComponent, HKEY *key, B extern UINT MSIREG_OpenLocalClassesProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create); extern UINT MSIREG_OpenLocalManagedProductKey(LPCWSTR szProductCode, HKEY *key, BOOL create); extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct); +extern UINT MSIREG_DeleteLocalUserDataComponentKey(LPCWSTR szComponent); extern UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent); extern LPWSTR msi_reg_get_val_str( HKEY hkey, LPCWSTR name ); diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index 37558e7..6135b47 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -214,6 +214,8 @@ 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 localsid[] = {'S','-','1','-','5','-','1','8',0}; + BOOL unsquash_guid(LPCWSTR in, LPWSTR out) { DWORD i,n=0; @@ -666,6 +668,38 @@ UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create) return rc; } +UINT MSIREG_OpenLocalUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create) +{ + WCHAR comp[GUID_SIZE]; + WCHAR keypath[0x200]; + + TRACE("%s\n", debugstr_w(szComponent)); + if (!squash_guid(szComponent, comp)) + return ERROR_FUNCTION_FAILED; + TRACE("squished (%s)\n", debugstr_w(comp)); + + sprintfW(keypath, szUserDataComp_fmt, localsid, comp); + + if (create) + return RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key); + + return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key); +} + +UINT MSIREG_DeleteLocalUserDataComponentKey(LPCWSTR szComponent) +{ + WCHAR comp[GUID_SIZE]; + WCHAR keypath[0x200]; + + TRACE("%s\n", debugstr_w(szComponent)); + if (!squash_guid(szComponent, comp)) + return ERROR_FUNCTION_FAILED; + TRACE("squished (%s)\n", debugstr_w(comp)); + + sprintfW(keypath, szUserDataComp_fmt, localsid, comp); + return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath); +} + UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create) { UINT rc; @@ -795,8 +829,6 @@ UINT MSIREG_OpenCurrentUserInstallProps(LPCWSTR szProduct, HKEY *key, UINT MSIREG_OpenLocalSystemInstallProps(LPCWSTR szProduct, HKEY *key, BOOL create) { - static const WCHAR localsid[] = {'S','-','1','-','5','-','1','8',0}; - return MSIREG_OpenInstallProps(szProduct, localsid, key, create); } diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 410121d..bf329a1 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2773,6 +2773,31 @@ static void test_publish_processcomponents(void) RegDeleteKeyA(comp, ""); RegCloseKey(comp); + /* ProcessComponents, machine */ + r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=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"); + + sprintf(keypath, keyfmt, "S-1-5-18"); + + res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &comp); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + size = MAX_PATH; + res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB", + NULL, NULL, (LPBYTE)val, &size); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(!lstrcmpA(val, "C:\\Program Files\\msitest\\maximus"), + "Expected \"%s\", got \"%s\"\n", "C:\\Program Files\\msitest\\maximus", val); + + res = RegOpenKeyA(HKEY_LOCAL_MACHINE, compkey, &hkey); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + + RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB"); + RegDeleteKeyA(comp, ""); + RegCloseKey(comp); + DeleteFile(msifile); DeleteFile("msitest\\maximus"); RemoveDirectory("msitest");
1
0
0
0
James Hawkins : msi: Don't publish components to the Installer key.
by Alexandre Julliard
18 Jun '08
18 Jun '08
Module: wine Branch: master Commit: 4aa3a997f87d377730431c43cf2ffd3fed504b4b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4aa3a997f87d377730431c43c…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Jun 18 00:49:42 2008 -0500 msi: Don't publish components to the Installer key. --- dlls/msi/action.c | 50 ++++++++++----------------------------------- dlls/msi/msipriv.h | 1 - dlls/msi/registry.c | 7 +----- dlls/msi/tests/install.c | 8 +------ 4 files changed, 13 insertions(+), 53 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index f319427..f6c82ac 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -2822,15 +2822,11 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) WCHAR squished_cc[GUID_SIZE]; UINT rc; MSICOMPONENT *comp; - HKEY hkey=0,hkey2=0; + HKEY hkey; TRACE("\n"); - /* writes the Component and Features values to the registry */ - - rc = MSIREG_OpenComponents(&hkey); - if (rc != ERROR_SUCCESS) - return rc; + /* writes the Component values to the registry */ squash_guid(package->ProductCode,squished_pc); ui_progress(package,1,COMPONENT_PROGRESS_VALUE,1,0); @@ -2862,14 +2858,12 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) */ if (ACTION_VerifyComponentForAction( comp, INSTALLSTATE_LOCAL)) { - rc = RegCreateKeyW(hkey,squished_cc,&hkey2); - if (rc != ERROR_SUCCESS) - continue; - if (!comp->FullKeypath) continue; - msi_reg_set_val_str( hkey2, squished_pc, comp->FullKeypath ); + rc = MSIREG_OpenUserDataComponentKey(comp->ComponentId, &hkey, TRUE); + if (rc != ERROR_SUCCESS) + continue; if (comp->Attributes & msidbComponentAttributesPermanent) { @@ -2878,36 +2872,14 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) '0','0','0','0','0','0','0','0','0','0','0','0', '0','0','0','0','0','0','0','0',0 }; - msi_reg_set_val_str( hkey2, szPermKey, comp->FullKeypath ); + msi_reg_set_val_str(hkey, szPermKey, comp->FullKeypath); } - RegCloseKey(hkey2); - - rc = MSIREG_OpenUserDataComponentKey(comp->ComponentId, &hkey2, TRUE); - if (rc != ERROR_SUCCESS) - continue; - - msi_reg_set_val_str(hkey2, squished_pc, comp->FullKeypath); - RegCloseKey(hkey2); + msi_reg_set_val_str(hkey, squished_pc, comp->FullKeypath); + RegCloseKey(hkey); } - else if (ACTION_VerifyComponentForAction( comp, INSTALLSTATE_ABSENT)) - { - DWORD res; - - rc = RegOpenKeyW(hkey,squished_cc,&hkey2); - if (rc != ERROR_SUCCESS) - continue; - - RegDeleteValueW(hkey2,squished_pc); - - /* if the key is empty delete it */ - res = RegEnumKeyExW(hkey2,0,NULL,0,0,NULL,0,NULL); - RegCloseKey(hkey2); - if (res == ERROR_NO_MORE_ITEMS) - RegDeleteKeyW(hkey,squished_cc); - + else if (ACTION_VerifyComponentForAction(comp, INSTALLSTATE_ABSENT)) MSIREG_DeleteUserDataComponentKey(comp->ComponentId); - } /* UI stuff */ uirow = MSI_CreateRecord(3); @@ -2917,8 +2889,8 @@ static UINT ACTION_ProcessComponents(MSIPACKAGE *package) ui_actiondata(package,szProcessComponents,uirow); msiobj_release( &uirow->hdr ); } - RegCloseKey(hkey); - return rc; + + return ERROR_SUCCESS; } typedef struct { diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 19d0b0d..6dcd267 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -767,7 +767,6 @@ extern UINT MSIREG_OpenUserProductsKey(LPCWSTR szProduct, HKEY* key, BOOL create extern UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create); extern UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, HKEY* key, BOOL create); extern UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create); -extern UINT MSIREG_OpenComponents(HKEY* key); extern UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create); extern UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create); extern UINT MSIREG_OpenProductsKey(LPCWSTR szProduct, HKEY* key, BOOL create); diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index b95d5bb..37558e7 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -645,11 +645,6 @@ UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create) return rc; } -UINT MSIREG_OpenComponents(HKEY* key) -{ - return RegCreateKeyW(HKEY_LOCAL_MACHINE,szInstaller_Components,key); -} - UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create) { UINT rc; @@ -1240,7 +1235,7 @@ UINT WINAPI MsiEnumComponentsW(DWORD index, LPWSTR lpguid) TRACE("%d %p\n", index, lpguid); - r = MSIREG_OpenComponents(&hkeyComponents); + r = RegCreateKeyW(HKEY_LOCAL_MACHINE, szInstaller_Components, &hkeyComponents); if( r != ERROR_SUCCESS ) return ERROR_NO_MORE_ITEMS; diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index d20a4fe..410121d 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -2767,13 +2767,7 @@ static void test_publish_processcomponents(void) "Expected \"%s\", got \"%s\"\n", "C:\\Program Files\\msitest\\maximus", val); res = RegOpenKeyA(HKEY_LOCAL_MACHINE, compkey, &hkey); - todo_wine - { - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - } - - if (res == ERROR_SUCCESS) - RegCloseKey(hkey); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB"); RegDeleteKeyA(comp, "");
1
0
0
0
James Hawkins : msi: Determine the installation context after reading properties from the command line .
by Alexandre Julliard
18 Jun '08
18 Jun '08
Module: wine Branch: master Commit: 5f11262da9249ec1f590db7bfe0d8d93c18d900a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f11262da9249ec1f590db7bf…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Jun 18 00:50:28 2008 -0500 msi: Determine the installation context after reading properties from the command line. --- dlls/msi/action.c | 25 +++++++++++++++++++++++++ dlls/msi/package.c | 26 -------------------------- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index f6c82ac..ca7da98 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -648,6 +648,30 @@ static UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace) return ERROR_SUCCESS; } +static UINT msi_set_context(MSIPACKAGE *package) +{ + WCHAR val[10]; + DWORD sz = 10; + DWORD num; + UINT r; + + static const WCHAR szOne[] = {'1',0}; + static const WCHAR szAllUsers[] = {'A','L','L','U','S','E','R','S',0}; + + package->Context = MSIINSTALLCONTEXT_USERUNMANAGED; + + r = MSI_GetPropertyW(package, szAllUsers, val, &sz); + if (r == ERROR_SUCCESS) + { + num = atolW(val); + if (num == 1 || num == 2) + package->Context = MSIINSTALLCONTEXT_MACHINE; + } + + MSI_SetPropertyW(package, szAllUsers, szOne); + return ERROR_SUCCESS; +} + /**************************************************** * TOP level entry points *****************************************************/ @@ -710,6 +734,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, /* properties may have been added by a transform */ msi_clone_properties( package ); + msi_set_context( package ); if ( (msi_get_property_int(package, szUILevel, 0) & INSTALLUILEVEL_MASK) >= INSTALLUILEVEL_REDUCED ) { diff --git a/dlls/msi/package.c b/dlls/msi/package.c index f11b068..0b9dacf 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -760,30 +760,6 @@ static UINT msi_load_admin_properties(MSIPACKAGE *package) return r; } -static UINT msi_set_context(MSIPACKAGE *package) -{ - WCHAR val[10]; - DWORD sz = 10; - DWORD num; - UINT r; - - static const WCHAR szOne[] = {'1',0}; - static const WCHAR szAllUsers[] = {'A','L','L','U','S','E','R','S',0}; - - package->Context = MSIINSTALLCONTEXT_USERUNMANAGED; - - r = MSI_GetPropertyW(package, szAllUsers, val, &sz); - if (r == ERROR_SUCCESS) - { - num = atolW(val); - if (num == 1 || num == 2) - package->Context = MSIINSTALLCONTEXT_MACHINE; - } - - MSI_SetPropertyW(package, szAllUsers, szOne); - return ERROR_SUCCESS; -} - MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url ) { static const WCHAR szLevel[] = { 'U','I','L','e','v','e','l',0 }; @@ -823,8 +799,6 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url ) if (package->WordCount & MSIWORDCOUNT_ADMINISTRATIVE) msi_load_admin_properties( package ); - - msi_set_context( package ); } return package;
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
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