Commit baeed206 authored by Louis Lenders's avatar Louis Lenders Committed by Vitaly Lipatov

shell32: Append .exe when registry lookup fails first time

parent a34f56ac
......@@ -453,7 +453,10 @@ static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env)
lstrcpyW(buffer, L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\");
lstrcatW(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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment