ShellExecute() takes too long
Posted on 2007-07-31
I have a ShellExecute() call in an application that opens Firefox.exe:
hdl = ShellExecute(
NULL, // parent window
"open", // verb: open = "double-click"
"C:\\Program Files\\Mozilla Firefox\\firefox.exe",
NULL, // no parameters passed to program being opened
NULL, // default directory
SW_NORMAL); // flags: open
when a button on an MFC dialog box is selected. The problem is that it takes about 30 seconds to open Firefox this way, while if I double click a shortcut on my desktop that's set to
C:\Program Files\Mozilla Firefox\firefox.exe
Firefox opens right away. What's taking ShellExecute() so long and how can I open Firefox faster from my application?