forked from Mirrors/wine-wine
msi/tests: Use HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE for registry tests.
Works around test failures on 64-bit Windows where MsiInstallProduct returns success even though the registry keys specified in the Registry table are not created.oldstable
parent
4102156e0f
commit
7c89d4f28f
|
@ -151,10 +151,10 @@ static const CHAR property_dat[] = "Property\tValue\n"
|
||||||
static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
|
static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
|
||||||
"s72\ti2\tl255\tL255\tL0\ts72\n"
|
"s72\ti2\tl255\tL255\tL0\ts72\n"
|
||||||
"Registry\tRegistry\n"
|
"Registry\tRegistry\n"
|
||||||
"Apples\t2\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n"
|
"Apples\t1\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n"
|
||||||
"Oranges\t2\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n"
|
"Oranges\t1\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n"
|
||||||
"regdata\t2\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n"
|
"regdata\t1\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n"
|
||||||
"OrderTest\t2\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent";
|
"OrderTest\t1\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent";
|
||||||
|
|
||||||
typedef struct _msi_table
|
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\\filename", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "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);
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
size = MAX_PATH;
|
size = MAX_PATH;
|
||||||
|
@ -2542,7 +2542,7 @@ static void test_Installer_InstallProduct(void)
|
||||||
|
|
||||||
RegCloseKey(hkey);
|
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);
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
/* Remove registry keys written by RegisterProduct standard action */
|
/* Remove registry keys written by RegisterProduct standard action */
|
||||||
|
|
|
@ -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"
|
static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
|
||||||
"s72\ti2\tl255\tL255\tL0\ts72\n"
|
"s72\ti2\tl255\tL255\tL0\ts72\n"
|
||||||
"Registry\tRegistry\n"
|
"Registry\tRegistry\n"
|
||||||
"Apples\t2\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n"
|
"Apples\t1\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n"
|
||||||
"Oranges\t2\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n"
|
"Oranges\t1\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n"
|
||||||
"regdata\t2\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n"
|
"regdata\t1\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n"
|
||||||
"OrderTest\t2\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent";
|
"OrderTest\t1\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent";
|
||||||
|
|
||||||
static const CHAR service_install_dat[] = "ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
|
static const CHAR service_install_dat[] = "ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
|
||||||
"LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
|
"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\\service.exe", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "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);
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
size = MAX_PATH;
|
size = MAX_PATH;
|
||||||
|
@ -3759,7 +3759,7 @@ static void test_MsiInstallProduct(void)
|
||||||
|
|
||||||
check_service_is_installed();
|
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 */
|
/* not published, reinstall */
|
||||||
r = MsiInstallProductA(msifile, NULL);
|
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\\service.exe", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "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);
|
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));
|
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\\service.exe", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "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);
|
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));
|
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\\service.exe", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "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);
|
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));
|
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\\service.exe", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "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);
|
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));
|
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\\service.exe", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "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);
|
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));
|
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\\service.exe", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "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);
|
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));
|
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\\service.exe", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "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);
|
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));
|
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\\service.exe", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "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);
|
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));
|
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\\service.exe", TRUE), "File not installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "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);
|
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
|
||||||
|
|
||||||
r = MsiInstallProductA(msifile, "REMOVE=ALL");
|
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\\augustus", TRUE), "File installed\n");
|
||||||
ok(delete_pf("msitest", FALSE), "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);
|
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
|
||||||
|
|
||||||
size = MAX_PATH;
|
size = MAX_PATH;
|
||||||
|
@ -7459,8 +7459,7 @@ static void test_writeregistryvalues(void)
|
||||||
ok(size == 15, "Expected 15, got %d\n", size);
|
ok(size == 15, "Expected 15, got %d\n", size);
|
||||||
ok(type == REG_MULTI_SZ, "Expected REG_MULTI_SZ, got %d\n", type);
|
ok(type == REG_MULTI_SZ, "Expected REG_MULTI_SZ, got %d\n", type);
|
||||||
|
|
||||||
delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", access);
|
RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest");
|
||||||
delete_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine", access);
|
|
||||||
|
|
||||||
error:
|
error:
|
||||||
DeleteFile(msifile);
|
DeleteFile(msifile);
|
||||||
|
|
Loading…
Reference in New Issue