Sign in to follow this  
Followers 0
silvercover

Registery key for Default Browser

6 posts in this topic

Hi,

How can I find out which browser is default browser?

thanks B)


The more I learn the less I know!

Share this post


Link to post
Share on other sites



Hi,

How can I find out which browser is default browser?

thanks B)

This might help.

HKEY_CLASSES_ROOT\http\shell\open\command



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

$Internet_Browser_Name = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\htmlfile\shell\open\command", "")

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Well since we're all showing different ways:

$URL = "http://www.mysite.com"
DllCall("shell32.dll", "long", "ShellExecute", "hwnd", 0, "string", 'open', "string", $URL, "string", '', "string", @ScriptDir, "long", @SW_SHOWNORMAL)

Edit: Of course if I bothered to reade the title of this post before I posted, I would of seen you were looking for the specific Registry key... oops

Edited by ronsrules

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

$Internet_Browser_Name = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\htmlfile\shell\open\command", "")

There is no guarantee that the ProgID used by HTML files will actually be "htmlfile". In fact, the ProgID on my machine is "FirefoxHTML". If I ran your snippet on my machine, I would get the wrong results back since the values contained in the htmlfile sub-key are irrelevant to what the real settings on my system are.

Share this post


Link to post
Share on other sites

This might help.

HKEY_CLASSES_ROOT\http\shell\open\command

Plus:

HKEY_CLASSES_ROOT\https\shell\open\command

HKEY_CLASSES_ROOT\ftp\shell\open\command

HKEY_CLASSES_ROOT\gopher\shell\open\command !! I like this one :-)

HKEY_CLASSES_ROOT\htmlfile\shell\open\command

HKEY_CLASSES_ROOT\FirefoxHTML\shell\open\command

and maybe some more.... Unfortunately there is no single entry for the "default browser". It all depends on which protocol or file extension you are going to use/access.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0