Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/tests/action.c | 80 ++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 45 deletions(-)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 980ed50..cefa1d7 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -2633,12 +2633,9 @@ static void test_register_product(void) LPSTR usersid; char date[MAX_PATH], temp[MAX_PATH], keypath[MAX_PATH], path[MAX_PATH]; DWORD size, type; - REGSAM access = KEY_ALL_ACCESS;
static const CHAR uninstall[] = "Software\Microsoft\Windows\CurrentVersion" "\Uninstall\{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"; - static const CHAR uninstall_32node[] = "Software\Wow6432Node\Microsoft\Windows\CurrentVersion" - "\Uninstall\{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"; static const CHAR userdata[] = "Software\Microsoft\Windows\CurrentVersion\Installer" "\UserData\%s\Products\84A88FD7F6998CE40A22FB59F6B9C2BB"; static const CHAR ugkey[] = "Software\Microsoft\Windows\CurrentVersion\Installer" @@ -2663,9 +2660,6 @@ static void test_register_product(void)
create_database(msifile, pp_tables, sizeof(pp_tables) / sizeof(msi_table));
- if (is_wow64) - access |= KEY_WOW64_64KEY; - MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL);
/* RegisterProduct */ @@ -2682,16 +2676,8 @@ static void test_register_product(void) res = RegOpenKeyA(HKEY_CURRENT_USER, userugkey, &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
- if (is_64bit) - { - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall_32node, 0, KEY_ALL_ACCESS, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - } - else - { - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_ALL_ACCESS, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - } + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey); + ok(!res, "got %d\n", res);
CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST"); CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1"); @@ -2718,14 +2704,15 @@ static void test_register_product(void) todo_wine CHECK_DEL_REG_DWORD(hkey, "EstimatedSize", get_estimated_size());
- delete_key(hkey, "", access); + res = RegDeleteKeyA(hkey, ""); + ok(!res, "got %d\n", res); RegCloseKey(hkey);
sprintf(keypath, userdata, usersid); - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey); + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, KEY_ALL_ACCESS | KEY_WOW64_64KEY, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
- res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props); + res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
size = sizeof(path); @@ -2758,26 +2745,31 @@ static void test_register_product(void) todo_wine CHECK_DEL_REG_DWORD(props, "EstimatedSize", get_estimated_size());
- delete_key(props, "", access); + res = RegDeleteKeyA(props, ""); + ok(!res, "got %d\n", res); RegCloseKey(props);
- res = RegOpenKeyExA(hkey, "Usage", 0, access, &usage); + res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage); todo_wine { ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); }
- delete_key(usage, "", access); + res = RegDeleteKeyA(usage, ""); +todo_wine + ok(!res, "got %d\n", res); RegCloseKey(usage); - delete_key(hkey, "", access); + res = RegDeleteKeyA(hkey, ""); + ok(!res, "got %d\n", res); RegCloseKey(hkey);
- res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, access, &hkey); + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL);
- delete_key(hkey, "", access); + res = RegDeleteKeyA(hkey, ""); + ok(!res, "got %d\n", res); RegCloseKey(hkey);
/* RegisterProduct, machine */ @@ -2786,19 +2778,11 @@ static void test_register_product(void) ok(delete_pf("msitest\maximus", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "Directory not created\n");
- res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, access, &hkey); + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
- if (is_64bit) - { - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall_32node, 0, KEY_ALL_ACCESS, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - } - else - { - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_ALL_ACCESS, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - } + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST"); CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1"); @@ -2825,14 +2809,15 @@ static void test_register_product(void) todo_wine CHECK_DEL_REG_DWORD(hkey, "EstimatedSize", get_estimated_size());
- delete_key(hkey, "", access); + res = RegDeleteKeyA(hkey, ""); + ok(!res, "got %d\n", res); RegCloseKey(hkey);
sprintf(keypath, userdata, "S-1-5-18"); - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey); + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
- res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props); + res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
size = sizeof(path); @@ -2865,26 +2850,31 @@ static void test_register_product(void) todo_wine CHECK_DEL_REG_DWORD(props, "EstimatedSize", get_estimated_size());
- delete_key(props, "", access); + res = RegDeleteKeyA(props, ""); + ok(!res, "got %d\n", res); RegCloseKey(props);
- res = RegOpenKeyExA(hkey, "Usage", 0, access, &usage); + res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage); todo_wine { ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); }
- delete_key(usage, "", access); + res = RegDeleteKeyA(usage, ""); +todo_wine + ok(!res, "got %d\n", res); RegCloseKey(usage); - delete_key(hkey, "", access); + res = RegDeleteKeyA(hkey, ""); + ok(!res, "got %d\n", res); RegCloseKey(hkey);
- res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, access, &hkey); + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL);
- delete_key(hkey, "", access); + res = RegDeleteKeyA(hkey, ""); + ok(!res, "got %d\n", res); RegCloseKey(hkey);
error:
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/tests/action.c | 4 ++++ dlls/msi/tests/custom.c | 28 ++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 34 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index cefa1d7..9409ad1 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -405,6 +405,8 @@ static const char pp_install_exec_seq_dat[] = "InstallFiles\t\t4000\n" "RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\n" "RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n" + "rp_immediate\tREGISTER_PRODUCT AND ALLUSERS\t6101\n" + "rp_deferred\tREGISTER_PRODUCT AND ALLUSERS\t6102\n" "PublishFeatures\tPUBLISH_FEATURES=1 Or FULL=1\t6300\n" "pf_immediate\tPUBLISH_FEATURES AND ALLUSERS\t6301\n" "pf_deferred\tPUBLISH_FEATURES AND ALLUSERS\t6302\n" @@ -423,6 +425,8 @@ static const char pp_custom_action_dat[] = "uf_deferred\t1025\tcustom.dll\tpf_absent\n" "pp_immediate\t1\tcustom.dll\tpp_absent\n" "pp_deferred\t1025\tcustom.dll\tpp_present\n" + "rp_immediate\t1\tcustom.dll\trp_absent\n" + "rp_deferred\t1025\tcustom.dll\trp_present\n" "ppc_immediate\t1\tcustom.dll\tppc_absent\n" "ppc_deferred\t1025\tcustom.dll\tppc_present\n";
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index b59b97a..5e91737 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1698,3 +1698,31 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
return ERROR_SUCCESS; } + +static const char rp_key[] = "Software\Microsoft\Windows\CurrentVersion\" + "Uninstall\{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"; + +UINT WINAPI rp_present(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, rp_key, 0, KEY_READ | KEY_WOW64_32KEY, &key); + ok(hinst, !res, "got %u\n", res); + check_reg_str(hinst, key, "DisplayName", "MSITEST"); + RegCloseKey(key); + + return ERROR_SUCCESS; +} + +UINT WINAPI rp_absent(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, rp_key, 0, KEY_READ | KEY_WOW64_32KEY, &key); +todo_wine + ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + + return ERROR_SUCCESS; +} diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec index 7f05f01..9dadfbd 100644 --- a/dlls/msi/tests/custom.spec +++ b/dlls/msi/tests/custom.spec @@ -33,6 +33,8 @@ @ stdcall rmi_absent(long) @ stdcall rd_present(long) @ stdcall rd_absent(long) +@ stdcall rp_present(long) +@ stdcall rp_absent(long) @ stdcall sds_present(long) @ stdcall sds_absent(long) @ stdcall sis_present(long)
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at https://testbot.winehq.org/JobDetails.pl?Key=38766
Your paranoid android.
=== w7u (32 bit install) === The task timed out
=== w7u (32 bit msi) === The task timed out
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/tests/action.c | 14 +++++++++++++ dlls/msi/tests/custom.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 66 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 9409ad1..22ece56 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -1654,15 +1654,28 @@ static const char rpi_install_exec_seq_dat[] = "UnregisterClassInfo\t\t3000\n" "UnregisterExtensionInfo\t\t3200\n" "UnregisterProgIdInfo\t\t3400\n" + "upi_immediate\tREMOVE\t3401\n" + "upi_deferred\tREMOVE\t3402\n" "InstallFiles\t\t3600\n" "RegisterClassInfo\t\t4000\n" "RegisterExtensionInfo\t\t4200\n" "RegisterProgIdInfo\t\t4400\n" + "rpi_immediate\tNOT REMOVE\t4401\n" + "rpi_deferred\tNOT REMOVE\t4402\n" "RegisterProduct\t\t5000\n" "PublishFeatures\t\t5100\n" "PublishProduct\t\t5200\n" "InstallFinalize\t\t6000\n";
+static const char rpi_custom_action_dat[] = + "Action\tType\tSource\tTarget\n" + "s72\ti2\tS64\tS0\n" + "CustomAction\tAction\n" + "rpi_immediate\t1\tcustom.dll\trpi_absent\n" + "rpi_deferred\t1025\tcustom.dll\trpi_present\n" + "upi_immediate\t1\tcustom.dll\trpi_present\n" + "upi_deferred\t1025\tcustom.dll\trpi_absent\n"; + static const char rmi_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" @@ -2272,6 +2285,7 @@ static const msi_table rpi_tables[] = ADD_TABLE(rpi_verb), ADD_TABLE(rpi_progid), ADD_TABLE(rpi_install_exec_seq), + ADD_TABLE(rpi_custom_action), ADD_TABLE(media), ADD_TABLE(property) }; diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 5e91737..f5aa344 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1726,3 +1726,53 @@ todo_wine
return ERROR_SUCCESS; } + +UINT WINAPI rpi_present(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { + res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", + 0, KEY_READ | KEY_WOW64_32KEY, &key); + ok(hinst, !res, "got %u\n", res); + RegCloseKey(key); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.1", &key); + ok(hinst, !res, "got %u\n", res); + RegCloseKey(key); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class", &key); + ok(hinst, !res, "got %u\n", res); + RegCloseKey(key); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.2", &key); + ok(hinst, !res, "got %u\n", res); + RegCloseKey(key); +} + + return ERROR_SUCCESS; +} + +UINT WINAPI rpi_absent(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { + res = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", + 0, KEY_READ | KEY_WOW64_32KEY, &key); + ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.1", &key); + ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class", &key); + ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + + res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.2", &key); + ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res); +} + + return ERROR_SUCCESS; +} diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec index 9dadfbd..2b3b76a 100644 --- a/dlls/msi/tests/custom.spec +++ b/dlls/msi/tests/custom.spec @@ -35,6 +35,8 @@ @ stdcall rd_absent(long) @ stdcall rp_present(long) @ stdcall rp_absent(long) +@ stdcall rpi_present(long) +@ stdcall rpi_absent(long) @ stdcall sds_present(long) @ stdcall sds_absent(long) @ stdcall sis_present(long)
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/tests/action.c | 4 ++++ dlls/msi/tests/custom.c | 28 ++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 34 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 22ece56..ea8c0e8 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -404,6 +404,8 @@ static const char pp_install_exec_seq_dat[] = "RemoveFiles\t\t3500\n" "InstallFiles\t\t4000\n" "RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\n" + "ru_immediate\tREGISTER_USER AND ALLUSERS\t6001\n" + "ru_deferred\tREGISTER_USER AND ALLUSERS\t6002\n" "RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n" "rp_immediate\tREGISTER_PRODUCT AND ALLUSERS\t6101\n" "rp_deferred\tREGISTER_PRODUCT AND ALLUSERS\t6102\n" @@ -427,6 +429,8 @@ static const char pp_custom_action_dat[] = "pp_deferred\t1025\tcustom.dll\tpp_present\n" "rp_immediate\t1\tcustom.dll\trp_absent\n" "rp_deferred\t1025\tcustom.dll\trp_present\n" + "ru_immediate\t1\tcustom.dll\tru_absent\n" + "ru_deferred\t1025\tcustom.dll\tru_present\n" "ppc_immediate\t1\tcustom.dll\tppc_absent\n" "ppc_deferred\t1025\tcustom.dll\tppc_present\n";
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index f5aa344..7a3f01e 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1776,3 +1776,31 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
return ERROR_SUCCESS; } + +static const CHAR ru_key[] = "Software\Microsoft\Windows\CurrentVersion\Installer" + "\UserData\S-1-5-18\Products\84A88FD7F6998CE40A22FB59F6B9C2BB\InstallProperties"; + +UINT WINAPI ru_present(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ru_key, 0, KEY_READ | KEY_WOW64_64KEY, &key); + ok(hinst, !res, "got %u\n", res); + check_reg_str(hinst, key, "ProductID", "none"); + RegCloseKey(key); + + return ERROR_SUCCESS; +} + +UINT WINAPI ru_absent(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + + res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ru_key, 0, KEY_READ | KEY_WOW64_64KEY, &key); +todo_wine + ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res); + + return ERROR_SUCCESS; +} diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec index 2b3b76a..eec6a43 100644 --- a/dlls/msi/tests/custom.spec +++ b/dlls/msi/tests/custom.spec @@ -37,6 +37,8 @@ @ stdcall rp_absent(long) @ stdcall rpi_present(long) @ stdcall rpi_absent(long) +@ stdcall ru_present(long) +@ stdcall ru_absent(long) @ stdcall sds_present(long) @ stdcall sds_absent(long) @ stdcall sis_present(long)
Signed-off-by: Hans Leidekker hans@codeweavers.com