Jump to content

Finding Default Browser - and calling it


 Share

Recommended Posts

Hello,

I have been working on a script that is working fine because I am calling IE in the script. The problem is that we have people using Firefox...I have searched these forums for a way to detect the default browser and call that but haven't found it.

Anyone have any ideas how to detect which browser is default?

Link to comment
Share on other sites

Yes... You havn't searched the forums too much if you havn't found this.

This is a snippet of a larger script by me.

$GetDefaultBrowser = RegRead("HKCR\HTTP\Shell\Open\Command", "")
$GetLastSection = StringSplit($GetDefaultBrowser, "\")
$GetProcessName = StringSplit($GetLastSection[$GetLastSection[0]], """")

$GetProcessName[1] would be the executable of the default internet browser.

Link to comment
Share on other sites

Launch default browser:

ShellExecute("about:blank")

Launch default .mp3 player:

$key = RegRead("HKEY_CLASSES_ROOT\mp3file\shell\open\command", "")
$count = StringInStr($key, "/") - 2
$launchCmd = StringLeft($key, $count)
ShellExecute($launchCmd)

Launch default .mwv player and play sqVideo.wmv -

ShellExecute('"C:\sqVideo.wmv"')

Launch default email client:

ShellExecute("mailto:")

Launch default email client and fill in the To field:

ShellExecute("mailto:sam@squirrelybusiness.net")

Open default browser and navigate to Google:

ShellExecute("http://www.google.com")
Edited by Squirrely1

Das Häschen benutzt Radar

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...