fix x86 detection on 64 bit windows

Signed-off-by: Fourmisain <8464472+Fourmisain@users.noreply.github.com>
This commit is contained in:
Fourmisain 2024-05-20 23:13:18 +02:00
parent 08918be11e
commit af157c1613
No known key found for this signature in database
GPG Key ID: CC3A72C824CAFD13

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;