VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Default Browser

by pk (2 Submissions)
Category: Registry
Compatability: VB Script
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

This code will determine your default browser.

Assumes
Copyright 2005 Paul Kurczaba
Code Returns
The function returns the location of your default browser.
Side Effects
None :)

Rate Default Browser

Public Function DefaultBrowser()
On Error Resume Next
Dim Regentry As String
Set TheReg = CreateObject("Wscript.Shell")
Regentry = TheReg.RegRead("HKEY_CLASSES_ROOT\HTTP\shell\open\command\")
Regentry = Replace(Regentry, Chr(34), "")
Regentry = Mid(Regentry, 1, InStr(1, LCase(Regentry), ".exe") + 3)
DefaultBrowser = Regentry
End Function

Download this snippet    Add to My Saved Code

Default Browser Comments

No comments have been posted about Default Browser. Why not be the first to post a comment about Default Browser.

Post your comment

Subject:
Message:
0/1000 characters