|
-
May 14th, 1999, 02:59 AM
#1
finding default browser
hi
i am writing an application in vc++ which is to open an html file. for this i want to know the existing browser in system.
when i am trying to get it from registry , i am not finding consistency in CLSID entries made by netscape and internetExplorer.
say internet explorer is not having entry LocalServer32 for its exe.
Is there any to find it out programatically???
just if i get the exe path of browser its enough.
please help me to find it out
Raghu
-
May 14th, 1999, 03:29 AM
#2
Re: finding default browser
Find the registry entry for ".html" (without the quotes), this will give the document type (the description displayed in Windows Explorer's full details view). Then, search for the shell\command\open (it's something like that, I can't remember exactly and I can't view my registry here - disabled by admin)subkey under this document type key (not under the .html key), and this should give a string of the form:
c:\somedirectory\someotherdir\iexplore.exe,1
If you strip off the ',' and digit(s), that gives you the EXE path.
If you want more info, e-mail me at [email protected] and I'll give a code example.
-
May 14th, 1999, 06:23 AM
#3
Re: finding default browser
An alternative to manually locating the default Web browser is to let Windows do the work for you.
You can use the ShellExecute() function to open the page. For example:
char *pFile = "c:\\files\\index.html";
ShellExecute(NULL, "open", pFile, NULL, NULL, SW_SHOWNORMAL);
--
Daren Chandisingh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|