msi: Any value of WindowsInstaller besides 0 means the product is installed.
This commit is contained in:
parent
7da89f48fd
commit
3bf32f2700
|
@ -799,17 +799,11 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
|
|||
if (rc != ERROR_SUCCESS)
|
||||
goto end;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case 1:
|
||||
/* default */
|
||||
if (state)
|
||||
state = INSTALLSTATE_DEFAULT;
|
||||
break;
|
||||
default:
|
||||
FIXME("Unknown install state read from registry (%i)\n",state);
|
||||
else
|
||||
state = INSTALLSTATE_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
|
||||
end:
|
||||
RegCloseKey(props);
|
||||
RegCloseKey(hkey);
|
||||
|
|
|
@ -427,6 +427,14 @@ static void test_MsiQueryProductState(void)
|
|||
state = MsiQueryProductStateA(prodcode);
|
||||
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, "");
|
||||
|
||||
/* user product key does not exist */
|
||||
|
|
Loading…
Reference in New Issue