msi: Fix a failing test on win9x.

This commit is contained in:
James Hawkins 2009-02-25 21:14:28 -08:00 committed by Alexandre Julliard
parent a7d5adc91f
commit b55c031032
1 changed files with 11 additions and 4 deletions

View File

@ -2295,12 +2295,22 @@ static void test_Installer_InstallProduct(void)
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
res = find_registry_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData", "05FA3C1F65B896A40AC00077F34EF203", &hkey);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
ok(res == ERROR_SUCCESS ||
broken(res == ERROR_FILE_NOT_FOUND), /* win9x */
"Expected ERROR_SUCCESS, got %d\n", res);
if (res == ERROR_SUCCESS)
{
res = delete_registry_key(hkey, "05FA3C1F65B896A40AC00077F34EF203");
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
RegCloseKey(hkey);
res = RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\Products\\05FA3C1F65B896A40AC00077F34EF203");
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
}
else
{
/* win9x defaults to a per-machine install. */
RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\Products\\05FA3C1F65B896A40AC00077F34EF203");
}
/* Remove registry keys written by PublishProduct standard action */
@ -2315,9 +2325,6 @@ static void test_Installer_InstallProduct(void)
RegCloseKey(hkey);
res = RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\Products\\05FA3C1F65B896A40AC00077F34EF203");
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
/* Delete installation files we installed */
delete_test_files();
}