Commit 3bf32f27 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Any value of WindowsInstaller besides 0 means the product is installed.

parent 7da89f48
...@@ -799,17 +799,11 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct) ...@@ -799,17 +799,11 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
if (rc != ERROR_SUCCESS) if (rc != ERROR_SUCCESS)
goto end; goto end;
switch (state) if (state)
{
case 1:
/* default */
state = INSTALLSTATE_DEFAULT; state = INSTALLSTATE_DEFAULT;
break; else
default:
FIXME("Unknown install state read from registry (%i)\n",state);
state = INSTALLSTATE_UNKNOWN; state = INSTALLSTATE_UNKNOWN;
break;
}
end: end:
RegCloseKey(props); RegCloseKey(props);
RegCloseKey(hkey); RegCloseKey(hkey);
......
...@@ -427,6 +427,14 @@ static void test_MsiQueryProductState(void) ...@@ -427,6 +427,14 @@ static void test_MsiQueryProductState(void)
state = MsiQueryProductStateA(prodcode); state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
data = 2;
res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD));
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
/* WindowsInstaller value is not 1 */
state = MsiQueryProductStateA(prodcode);
ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
RegDeleteKeyA(userkey, ""); RegDeleteKeyA(userkey, "");
/* user product key does not exist */ /* user product key does not exist */
......
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