ShellExecuteEx fails to launch .html file in Vista (in one case)

ShellExecuteEx fails to launch .html file in Vista (in one case)

Post by TWlrZU1pb » Sun, 05 Aug 2007 06:04:25


Hi,

I am not sure is whether this is a exactly shell question but if not, I am
hoping someone here can point me in the right direction because I am at a bit
of a loss.

I have an application that needs to launch an html file in the users default
browser.

I use ShellExecuteEx with NULL as the verb. Everything works fine except for
with one customer who reports that he is using Vista and it does not launch
the file. It works for him in XP. It works for us, and other customers, in
Vista.

In his case, he receives a message saying that there is no program
associated with the file extension, the browser is not launched and
Shellexecute returns NULL.

Re-associating .html to Internet Explorer (his only browser) does not help.

If he associates .html to notepad.exe, everything works. The file is opened
in notepad.

His registry settings for HKCU\.html and htmlfile seem to be correct.

We have had him try a separate Shellexecute utility
( http://www.yqcomputer.com/ #ShellExec
) to rule out some anomaly with our exe. No luck there either.

Further testing with the ShellExecute verbs 'opennew' and 'open' also don't
work for him.

Strangely, if he right-clicks the html file in question, 'Open' is the
default verb and when it is selected , IE opens and displays the file
correctly. IE is not in protected mode when he loads the file this way.

He has tried resetting all the IE reset options.

Does anyone have any thoughts on what could be wrong or where to look?

Thanks in advance,
Mike
 
 
 

ShellExecuteEx fails to launch .html file in Vista (in one case)

Post by David Lown » Sun, 05 Aug 2007 18:36:24

>I have an application that needs to launch an html file in the users default

It works for me in Vista too.

What happens for the customer if they type the html file path/name in
the Start/Search field in Vista?

Is it consistent if they try ShellExecute as well as ShellExecuteEx
with my utility?


As a last ditched attempt I'd suggest that they try reinstalling the
OS and doing a repair installation (or whatever it's called in Vista).

Dave