Commit 12a55d91 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi/tests: Clean up the local package in test_register_product.

parent 395887b6
...@@ -2491,12 +2491,10 @@ static void test_register_product(void) ...@@ -2491,12 +2491,10 @@ static void test_register_product(void)
{ {
UINT r; UINT r;
LONG res; LONG res;
HKEY hkey; HKEY hkey, props, usage;
HKEY props, usage;
LPSTR usersid; LPSTR usersid;
char date[MAX_PATH]; char date[MAX_PATH], temp[MAX_PATH], keypath[MAX_PATH], path[MAX_PATH];
char temp[MAX_PATH]; DWORD size, type;
char keypath[MAX_PATH];
REGSAM access = KEY_ALL_ACCESS; REGSAM access = KEY_ALL_ACCESS;
static const CHAR uninstall[] = "Software\\Microsoft\\Windows\\CurrentVersion" static const CHAR uninstall[] = "Software\\Microsoft\\Windows\\CurrentVersion"
...@@ -2594,7 +2592,11 @@ static void test_register_product(void) ...@@ -2594,7 +2592,11 @@ static void test_register_product(void)
res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props); res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
size = sizeof(path);
RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size);
DeleteFileA(path);
RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */ RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */
CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST"); CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST");
CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1"); CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1");
CHECK_DEL_REG_STR(props, "InstallDate", date); CHECK_DEL_REG_STR(props, "InstallDate", date);
...@@ -2701,7 +2703,11 @@ static void test_register_product(void) ...@@ -2701,7 +2703,11 @@ static void test_register_product(void)
res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props); res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
size = sizeof(path);
RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size);
DeleteFileA(path);
RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */ RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */
CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST"); CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST");
CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1"); CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1");
CHECK_DEL_REG_STR(props, "InstallDate", date); CHECK_DEL_REG_STR(props, "InstallDate", date);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment