On Sun, 3 Nov 2002 12:53:15 -0500, "Dimitrie O. Paun" dpaun@rogers.com wrote :
But the question is whether or not CreateProcess _should_ find it, or not. If it is, than it's a bug in CreateProcess, and working around it is rather detrimental. If not, than fine, use the full path. We should always try to fix the bug at the source, not to invent workarounds.
Agreed, if a know bug exists it needs to be fixed. I was in a rush when replying to your initial request for clarification, so I didn't express it properly. I however, did look at what the correct behaviour of CreateProcess should be when I came across this. According to MSDN:
"The string can specify the full path and file name of the module to execute or it can specify a partial name. In the case of a partial name, the function uses the current drive and current directory to complete the specification. The function will not use the search path. If the file name does not contain an extension, .exe is assumed. Therefore, if the file name extension is .com, this parameter must include the .com extension."
So no, I didn't try to create workarounds. As I've said, it is something that bugged me as well. :)
Greetings, Jaco
On 3 Nov 2002, Jaco Greeff wrote: [...]
I however, did look at what the correct behaviour of CreateProcess should be when I came across this. According to MSDN:
"The string can specify the full path and file name of the module to execute or it can specify a partial name. In the case of a partial name, the function uses the current drive and current directory to complete the specification. The function will not use the search path. If the file name does not contain an extension, .exe is assumed. Therefore, if the file name extension is .com, this parameter must include the .com extension."
This is if you specify the lpApplicationName parameter. To have CreateProcess search the path, leave it as NULL and specify "wcmd.exe ..." in lpCommandLine.
Then it should work.
Francois Gouget wrote:
This is if you specify the lpApplicationName parameter. To have CreateProcess search the path, leave it as NULL and specify "wcmd.exe ..." in lpCommandLine.
Very good point. I'll look into it.
Greetings, Jaco