Problem with ShellExecute and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths
Duane Clark
dclark at akamail.com
Sun Dec 29 11:46:38 CST 2002
Dan Kegel wrote:
> I have a windows-free installation of current CVS wine,
> with wordpad.exe and the needed DLLs pulled in from a Windows ME
> installation. wordpad works great. However,
> ShellExecute(... "wordpad.exe", ".\\stl\\readme.wri" ...) is failing to find wordpad.exe for me.
> (The call in question is issued by the msvc4.0 setup.exe.
> The current directory when I run this is /mnt/cdrom, and stl/readme.wri is
> indeed there.)
Ignore the part about /usr/local/etc/system.reg.
With a few more traces, I see the first attempt to execute, triggered by
the execfunc at line 608 of ShellExecuteExA32. This is just a test to
see if the command line can be executed as is.
trace:exec:ShellExecuteExA32 mask=0x00000000 hwnd=(nil) verb="open"
file="wordpad.exe" parm="readme.txt" dir="C:\\" show=0x00000005
class=not used
trace:exec:ShellExecuteExA32 execute:'wordpad.exe','readme.txt'
trace:exec:SHELL_ExecuteA Execute wordpad.exe readme.txt from directory C:\
08073208:Call kernel32.CreateProcessA(00000000,40582788 "wordpad.exe
readme.txt",00000000,00000000,00000000,00000000,00000000,0040e4db
"C:\\",40581eb8,40581ea8) ret=40c8d29f
trace:process:CreateProcessA app (null) cmdline "wordpad.exe readme.txt"
trace:process:find_exe_file looking for "wordpad.exe"
According to MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp
CreateProcess should check several places for an application, none of
which include the registry key. So that call should fail, and it does.
08073208:Ret kernel32.CreateProcessA() retval=00000000 ret=40c8d29f
Next comes the test at line 614 of ShellExecuteExA32, which calls
SHELL_FindExecutable.
trace:exec:SHELL_FindExecutable wordpad.exe
08073208:Call kernel32.SearchPathA(0040e4db "C:\\",40582548
"wordpad.exe",40ca9be7 ".exe",00000100,40581af0,00000000) ret=40c8d43a
08073208:Ret kernel32.SearchPathA() retval=00000000 ret=40c8d43a
trace:exec:SHELL_FindExecutable xlpFile=,extension=(null)
warn:exec:SHELL_FindExecutable Returning 31 - No association
That call should have passed. It returns early at line 203, because
xlpFile and the extension, returned from SearchPathA are null. That
appears to be where things broke. Even if that passed, it does not
appear that a check for the "App Patch" key is being done here, and it
looks to me like it should be.
Is that enough to get you going further?
More information about the wine-devel
mailing list