From: Katy Feng Date: Thu, 5 Oct 2023 17:35:27 +0000 (-0700) Subject: Change to common source file not applicable to open-vm-tools. X-Git-Tag: stable-12.4.0~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af8cb38e92ac414539655f563f1f05fdaf532fe6;p=thirdparty%2Fopen-vm-tools.git Change to common source file not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/guestApp/guestApp.c b/open-vm-tools/lib/guestApp/guestApp.c index c767d5d1a..ddac5de6e 100644 --- a/open-vm-tools/lib/guestApp/guestApp.c +++ b/open-vm-tools/lib/guestApp/guestApp.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2019 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2019, 2023 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -142,7 +142,18 @@ GuestApp_GetInstallPathW(void) DWORD temp = 0; PWCHAR data = NULL; - rc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, TOOLS_KEY_NAME, 0, KEY_READ, &key); + /* + * We need to access the WOW3264Node Registry node for arm64 windows tools, + * since the arm64 installer is currently built with x86 emulation mode. + * + * TODO: REMOVE the the KEY_WOW64_32KEY once the msi installer is running + * in native arm64. + */ + REGSAM samDesired = KEY_READ; +#ifdef TOOLS_ARM64 + samDesired |= KEY_WOW64_32KEY; +#endif + rc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, TOOLS_KEY_NAME, 0, samDesired, &key); if (ERROR_SUCCESS != rc) { Debug("%s: Couldn't open key \"%S\".\n", __FUNCTION__, TOOLS_KEY_NAME); Debug("%s: RegOpenKeyExW error 0x%x.\n", __FUNCTION__, GetLastError());