hastx Posted April 16, 2008 Share Posted April 16, 2008 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 More sharing options...
JustinReno Posted April 16, 2008 Share Posted April 16, 2008 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 More sharing options...
Aassdd Posted April 16, 2008 Share Posted April 16, 2008 Can this be done but finding the media player instead? Link to comment Share on other sites More sharing options...
Squirrely1 Posted April 16, 2008 Share Posted April 16, 2008 (edited) 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 April 16, 2008 by Squirrely1 Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now