[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: Problem with ShellExecute and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
From:       Dan Kegel <dank () kegel ! com>
Date:       2002-12-29 23:52:21
[Download RAW message or body]

Duane Clark wrote:
> Dan Kegel wrote:
> 
>> ...
>> I also noticed that ShellExecute will sometimes try to
>> run the executable  "C:\\Program" (the first word of "C:\\Program 
>> Files\\whatever...").
>> I fixed that for the case I touched, I think, but didn't do a general 
>> fix.
> 
> 
> MSDN for CreateProcess claims that if the supplied string is not quoted, 
> then that is the correct behavior.

That is the correct behavior for CreateProcess, yes.
But it is an error for ShellExecute to execute
C:\Program
when it intended to execute
C:\Program Files\Accessories\wordpad.exe

See the "Security Remarks" at the bottom of
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp
which advise callers of CreateProcess to avoid this pitfall.
- Dan

-- 
Dan Kegel
Linux User #78045
http://www.kegel.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic