Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I find out the path to the default browser
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00457167
Message ID:
00457189
Views:
17
>Hi,
>I have the following problem:
>I would like to open a HTML page from my VFP application in the default Windows browser. I cannot use ShellExecute function, because I would like to search for a certain anchor (I'd like to open something like c:\html\mypage.htm#location).
>
>How do I find out a path do the default browser (e.g. c:\program files\netscape\communicator\program\netscape.exe or ..\..\iexprore.exe)?
>
>Thanks for help.
>
Martin,

Easiest is perhaps to use the registry to find what the default viewer for an htm file is. Simply retrieve the default value for HKEY_CLASSES_ROOT\.htm (which should be htmfile), the HKEY_CLASSES_ROOT\htmfile\Shell\Open\Command. The default value there contain the name of the browser program.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform