Fix setup regression
@@ -931,12 +931,21 @@ VOID PhInitializeKph(
)
{
NTSTATUS status;
+ ULONG latestBuildNumber;
PPH_STRING applicationDirectory;
PPH_STRING kprocesshackerFileName;
PPH_STRING processhackerSigFileName;
KPH_PARAMETERS parameters;
- if (PhGetIntegerSetting(L"KphBuildNumber") != PhOsVersion.dwBuildNumber)
+ latestBuildNumber = PhGetIntegerSetting(L"KphBuildNumber");
+
+ if (latestBuildNumber == 0)
+ {
+ PhSetIntegerSetting(L"KphBuildNumber", PhOsVersion.dwBuildNumber);
+ }
+ else
+ {
+ if (latestBuildNumber != PhOsVersion.dwBuildNumber)
{
// Reset KPH after a Windows build update. (dmex)
if (NT_SUCCESS(KphResetParameters(KPH_DEVICE_SHORT_NAME)))
@@ -944,6 +953,7 @@ VOID PhInitializeKph(
PhSetIntegerSetting(L"KphBuildNumber", PhOsVersion.dwBuildNumber);
}
}
+ }
if (!(applicationDirectory = PhGetApplicationDirectory()))
return;
