Add option to cygstart to use CreateProcess as opposed to ShellExecuteEx
Wed Sep 9 02:40:00 GMT 2009
Chris Sutcliffe wrote:
> I'm not sure if this is the appropriate list for this question, but I
> was wondering if you would entertain an option to use CreateProcess
> within cygstart (as opposed the default ShellExecuteEx), or a separate
> executable that uses CreateProcess? If this is inappropriate for this
> list, please let me know which list would be appropriate.
This is the right list, as far as I'm concerned. However, the reason
ShellExecuteEx is used, is because you can do this:
$ cygstart foo.pdf
and Acrobat Reader (or whatever app is associated with .pdf) will be
launched. You can't do that with CreateProcess.
> I've created a fairly basic utility (cygexec, source attached) that
> uses CreateProcess to launch windows executables.
So...how does this differ from run.exe and run2.exe? They both use
> Doing some
> preliminary tests, it executes windows executables in about half a
> second (according to 'time') as opposed to 3.5 seconds with cygstart
> (as a result of the ShellExecuteEx call).
Well, that seems really strange. Do you get the same slow behavior on
multiple machines/OS's, or just on a single machine?
More information about the Cygwin-apps