mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 16:45:50 +00:00
[SHELL32] Automatically add the .exe extension for App Paths in ShellExecuteEx. Patch by Yaroslav Veremenko. CORE-12049
svn path=/trunk/; revision=73182
This commit is contained in:
parent
1d2fe2375a
commit
813cc3f137
1 changed files with 9 additions and 1 deletions
|
@ -576,7 +576,15 @@ static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env)
|
|||
wcscpy(buffer, L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\");
|
||||
wcscat(buffer, szName);
|
||||
res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, buffer, 0, KEY_READ, &hkApp);
|
||||
if (res) goto end;
|
||||
if (res)
|
||||
{
|
||||
// Add ".exe" extension, if extension does not exists
|
||||
if (PathAddExtensionW(buffer, wszExe))
|
||||
{
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue