
Lanching the user's default web browser with a local file
Quote:
>Hi,
>How does one launch whatever the user's default web browser from a VB
>app under win95? Is there a way to find out such info, and to send a
>local file to the browser for display ?
>Please CC a response to my email address too.
>Thanks a lot for any help,
>Mounir El Abridi/
I've just started looking at a similar problem and have some ideas. I haven't
had a chance to try them yet, but I'll tell you what I'm thinking, anyway.
Maybe you can let me know if it works!
In the registry, there is a place that lists file types based on file
extensions (HKEY_LOCAL_MACHINE\SOFTWARE\Classes. There should be an item under
this key for .htm and .html files. These should both have a file type
associated with them (on my computer it's "NetscapeMarkup". With this item,
you should be able to find
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\NetscapeMarkup\shell\open\command. On my
machine the (Default) value is "path...\NETSCAPE.EXE "%1"" (substitute whatever
path). I don't know why the string has embedded quotes. They may be important
or may not. I would bet that substituting the file you want to open for the %1
in that command would do the trick.
Again, I'm only speculating at this point. If you try it or find a better
solution, let me know.
Good luck,
Mike Shadley