wine-staging/patches/shell32-registry-lookup-app/0001-shell32-Append-.exe-when-registry-lookup-fails-first.patch

29 lines
956 B
Diff
Raw Normal View History

From 79fbd3342a3e5c7cb2198bf2f0412db1df4b1fce Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox.xerox2000x@gmail.com>
Date: Thu, 4 Nov 2021 21:01:24 +1100
Subject: [PATCH] shell32: Append .exe when registry lookup fails first time
---
dlls/shell32/shlexec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c
index 069b96a51a1..5033330b60c 100644
--- a/dlls/shell32/shlexec.c
+++ b/dlls/shell32/shlexec.c
@@ -459,7 +459,10 @@ 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)
+ res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, lstrcatW(buffer, L".exe"), 0, KEY_READ, &hkApp);
+ if (res)
+ goto end;
len = MAX_PATH*sizeof(WCHAR);
res = RegQueryValueW(hkApp, NULL, lpResult, &len);
--
2.42.0