IE8 and ShellExecute weirdness
-
Hi, i am using
ShellExecute
to launch a url in the default browser, the same code has been working for a few years now. all of a sudden one guy is complaining that URLs are not working on his 3 PCs what happens isShellExecute
is called and "If IE8 is running it opens up the site fine but if no IE8 instance is running a new instance comes up, tries to load the page and just keeps loading and nothing happens" this is very weird cause its tha same old boilerplate code forShellExecute
Here is the codeHINSTANCE ret = ShellExecute(NULL, "open", "http://www.google.com", NULL, NULL, SW_SHOWNORMAL);
any ideas are more welcome thanks for your time
C++ where friends have access to your private members !
-
Hi, i am using
ShellExecute
to launch a url in the default browser, the same code has been working for a few years now. all of a sudden one guy is complaining that URLs are not working on his 3 PCs what happens isShellExecute
is called and "If IE8 is running it opens up the site fine but if no IE8 instance is running a new instance comes up, tries to load the page and just keeps loading and nothing happens" this is very weird cause its tha same old boilerplate code forShellExecute
Here is the codeHINSTANCE ret = ShellExecute(NULL, "open", "http://www.google.com", NULL, NULL, SW_SHOWNORMAL);
any ideas are more welcome thanks for your time
C++ where friends have access to your private members !
I think your call to ShellExecute has a problem. The third parameter should be the name of the .exe, and the fourth should be the command line parameter; in this case, the URL. What happens if you try this? (It works for me) -
ShellExecute(NULL, \_T("open"), \_T("iexplore.exe"), \_T("http://www.google.com"), NULL, SW\_SHOWNORMAL);
L u n a t i c F r i n g e
-
I think your call to ShellExecute has a problem. The third parameter should be the name of the .exe, and the fourth should be the command line parameter; in this case, the URL. What happens if you try this? (It works for me) -
ShellExecute(NULL, \_T("open"), \_T("iexplore.exe"), \_T("http://www.google.com"), NULL, SW\_SHOWNORMAL);
L u n a t i c F r i n g e
That is not what I would expect. Your code is enforcing Internet Explorer as the browser to open a particular URL; putting the URL (or any filename with a file extension association) as the third parameter should call the associated EXE to open that URL/file, similar to a double-click inside Windows Explorer. I suggest you try with a .doc file. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
-
That is not what I would expect. Your code is enforcing Internet Explorer as the browser to open a particular URL; putting the URL (or any filename with a file extension association) as the third parameter should call the associated EXE to open that URL/file, similar to a double-click inside Windows Explorer. I suggest you try with a .doc file. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]