Author: cwittich
Date: Mon May 12 19:55:25 2014
New Revision: 63265
URL:
http://svn.reactos.org/svn/reactos?rev=63265&view=rev
Log:
[shell32]
partial SHELL_FindExecutable sync to wine
Modified:
trunk/reactos/dll/win32/shell32/shlexec.cpp
Modified: trunk/reactos/dll/win32/shell32/shlexec.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlexec.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shlexec.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shlexec.cpp [iso-8859-1] Mon May 12 19:55:25 2014
@@ -450,15 +450,13 @@
startup.cb = sizeof(STARTUPINFOW);
startup.dwFlags = STARTF_USESHOWWINDOW;
startup.wShowWindow = psei->nShow;
+ dwCreationFlags = CREATE_UNICODE_ENVIRONMENT;
+ if (psei->fMask & SEE_MASK_NO_CONSOLE)
+ dwCreationFlags |= CREATE_NEW_CONSOLE;
startup.lpTitle = (LPWSTR)(psei->fMask & (SEE_MASK_HASLINKNAME |
SEE_MASK_HASTITLE) ? psei->lpClass : NULL);
if (psei->fMask & SEE_MASK_HASLINKNAME)
startup.dwFlags |= STARTF_TITLEISLINKNAME;
-
- dwCreationFlags = CREATE_UNICODE_ENVIRONMENT;
-
- if (psei->fMask & SEE_MASK_NO_CONSOLE)
- dwCreationFlags |= CREATE_NEW_CONSOLE;
if (CreateProcessW(NULL, (LPWSTR)lpCmd, NULL, NULL, FALSE, dwCreationFlags, env,
lpDirectory, &startup, &info))
@@ -703,7 +701,13 @@
lpFile = xlpFile;
/* Hey, isn't this value ignored? Why make this call? Shouldn't we
return here? --dank*/
}
-
+ else if (lpPath && SearchPathW(NULL, lpFile, wszExe,
sizeof(xlpFile)/sizeof(WCHAR), xlpFile, NULL))
+ {
+ TRACE("SearchPathW returned non-zero\n");
+ lpFile = xlpFile;
+ /* The file was found in one of the directories in the system-wide search path
*/
+ }
+
attribs = GetFileAttributesW(lpFile);
if (attribs != INVALID_FILE_ATTRIBUTES && (attribs &
FILE_ATTRIBUTE_DIRECTORY))
{