Module: wine Branch: master Commit: 4edfe426e45de2d50401c234947c92020805e11e URL: https://gitlab.winehq.org/wine/wine/-/commit/4edfe426e45de2d50401c234947c920...
Author: Louis Lenders xerox.xerox2000x@gmail.com Date: Thu Nov 4 21:01:24 2021 +1100
shell32: Try appending .exe when looking up an App Paths key.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51957
---
dlls/shell32/shlexec.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index f0dbb984103..abb519e260d 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -464,7 +464,13 @@ static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env)
wcscat(buffer, szName); res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, buffer, 0, KEY_READ, &hkApp); - if (res) goto end; + if (res) + { + wcscat(buffer, L".exe"); + res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, buffer, 0, KEY_READ, &hkApp); + } + if (res) + goto end;
len = MAX_PATH*sizeof(WCHAR); res = RegQueryValueW(hkApp, NULL, lpResult, &len);