Jump to content
Sign in to follow this  

Finding Default Browser - and calling it

Recommended Posts



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?

Share this post

Link to post
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.

Share this post

Link to post
Share on other sites

Can this be done but finding the media player instead?

Share this post

Link to post
Share on other sites

Launch default browser:


Launch default .mp3 player:

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

Launch default .mwv player and play sqVideo.wmv -


Launch default email client:


Launch default email client and fill in the To field:


Open default browser and navigate to Google:

Edited by Squirrely1

Das Häschen benutzt Radar

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.