fix x86 detection on 64 bit windows

Signed-off-by: Fourmisain <8464472+Fourmisain@users.noreply.github.com>
(cherry picked from commit af157c1613)
This commit is contained in:
Fourmisain 2024-05-20 23:13:18 +02:00 committed by github-actions[bot]
parent 67e0b68cd5
commit cfeb72450e

View File

@ -207,7 +207,7 @@ QList<JavaInstallPtr> JavaUtils::FindJavaFromRegistryKey(DWORD keyType, QString
QString newKeyName = keyName + "\\" + newSubkeyName + subkeySuffix;
HKEY newKey;
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, newKeyName.toStdWString().c_str(), 0, KEY_READ | KEY_WOW64_64KEY, &newKey) ==
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, newKeyName.toStdWString().c_str(), 0, KEY_READ | keyType, &newKey) ==
ERROR_SUCCESS) {
// Read the JavaHome value to find where Java is installed.
DWORD valueSz = 0;