diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index e74acf140e3..2b1449bdc40 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -151,10 +151,10 @@ static const CHAR property_dat[] = "Property\tValue\n" static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n" "s72\ti2\tl255\tL255\tL0\ts72\n" "Registry\tRegistry\n" - "Apples\t2\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n" - "Oranges\t2\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n" - "regdata\t2\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n" - "OrderTest\t2\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent"; + "Apples\t1\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n" + "Oranges\t1\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n" + "regdata\t1\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n" + "OrderTest\t1\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent"; typedef struct _msi_table { @@ -2514,7 +2514,7 @@ static void test_Installer_InstallProduct(void) ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n"); - res = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); + res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); size = MAX_PATH; @@ -2542,7 +2542,7 @@ static void test_Installer_InstallProduct(void) RegCloseKey(hkey); - res = delete_key_portable(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", access); + res = RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest"); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); /* Remove registry keys written by RegisterProduct standard action */ diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 33df370b2a4..72b16deae97 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -362,10 +362,10 @@ static const CHAR up3_property_dat[] = "Property\tValue\n" static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n" "s72\ti2\tl255\tL255\tL0\ts72\n" "Registry\tRegistry\n" - "Apples\t2\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n" - "Oranges\t2\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n" - "regdata\t2\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n" - "OrderTest\t2\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent"; + "Apples\t1\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n" + "Oranges\t1\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n" + "regdata\t1\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n" + "OrderTest\t1\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent"; static const CHAR service_install_dat[] = "ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t" "LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n" @@ -3731,7 +3731,7 @@ static void test_MsiInstallProduct(void) ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n"); - res = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); + res = RegOpenKeyEx(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); size = MAX_PATH; @@ -3759,7 +3759,7 @@ static void test_MsiInstallProduct(void) check_service_is_installed(); - delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", access); + delete_key(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", access); /* not published, reinstall */ r = MsiInstallProductA(msifile, NULL); @@ -3778,9 +3778,9 @@ static void test_MsiInstallProduct(void) ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n"); - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); + res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", access); + RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest"); create_database(msifile, up_tables, sizeof(up_tables) / sizeof(msi_table)); @@ -3801,9 +3801,9 @@ static void test_MsiInstallProduct(void) ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n"); - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); + res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", access); + RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest"); create_database(msifile, up2_tables, sizeof(up2_tables) / sizeof(msi_table)); @@ -3824,9 +3824,9 @@ static void test_MsiInstallProduct(void) ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n"); - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); + res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", access); + RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest"); create_database(msifile, up3_tables, sizeof(up3_tables) / sizeof(msi_table)); @@ -3847,9 +3847,9 @@ static void test_MsiInstallProduct(void) ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n"); - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); + res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", access); + RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest"); create_database(msifile, up4_tables, sizeof(up4_tables) / sizeof(msi_table)); @@ -3870,7 +3870,7 @@ static void test_MsiInstallProduct(void) ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n"); - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); + res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); create_database(msifile, up4_tables, sizeof(up4_tables) / sizeof(msi_table)); @@ -3892,7 +3892,7 @@ static void test_MsiInstallProduct(void) ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n"); - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); + res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); create_database(msifile, up5_tables, sizeof(up5_tables) / sizeof(msi_table)); @@ -3914,7 +3914,7 @@ static void test_MsiInstallProduct(void) ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n"); - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); + res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); create_database(msifile, up6_tables, sizeof(up6_tables) / sizeof(msi_table)); @@ -3936,7 +3936,7 @@ static void test_MsiInstallProduct(void) ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n"); - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); + res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); create_database(msifile, up7_tables, sizeof(up7_tables) / sizeof(msi_table)); @@ -3958,7 +3958,7 @@ static void test_MsiInstallProduct(void) ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); ok(delete_pf("msitest", FALSE), "File not installed\n"); - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); + res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); r = MsiInstallProductA(msifile, "REMOVE=ALL"); @@ -7447,7 +7447,7 @@ static void test_writeregistryvalues(void) ok(delete_pf("msitest\\augustus", TRUE), "File installed\n"); ok(delete_pf("msitest", FALSE), "File installed\n"); - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, access, &hkey); + res = RegOpenKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); size = MAX_PATH; @@ -7459,8 +7459,7 @@ static void test_writeregistryvalues(void) ok(size == 15, "Expected 15, got %d\n", size); ok(type == REG_MULTI_SZ, "Expected REG_MULTI_SZ, got %d\n", type); - delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", access); - delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine", access); + RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest"); error: DeleteFile(msifile);