How can i which is the default browser in my system programatically. the codes must be developed using vc++ Is there any API for this
Where in the registry is the default browser value changed can somebody help me out.
How can i which is the default browser in my system programatically. the codes must be developed using vc++ Is there any API for this
Where in the registry is the default browser value changed can somebody help me out.
you can find the default browser in the registry
ie for windows xp is located at
HKEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet\
edit: Actually the same applies for Vista as well.
Read the default value of HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet
and optionally check
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\XXX\shell\open\command
where XXX is that value picked up from the first key
You normally do not need to know this. ShellExecute(0,0,"http://stackoverflow.com",0,0,SW_SHOWNORMAL);
will do the trick. Windows will spot the http:// and figure out from there that you want to open a URL. The "default" webbrowser is pretty much defined as the webbrowser used by Windows for this task.
It's not just http:// which is supported. ShellExecute can start the default webbrowser with https:// URLs as well. For mailto: URLs, it starts the default mail client.