Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Under Windows, there is a way to find what the default browser is. You will have to use the commands</p> <pre><code>REG QUERY HKCR\.html /ve </code></pre> <p>which would return</p> <pre><code>! REG.EXE VERSION 3.0 HKEY_CLASSES_ROOT\.html &lt;NO NAME&gt; REG_SZ FirefoxHTML </code></pre> <p>Then you would query FirefoxHTML (or whatever value was returned) using the same command, and append the following to the key</p> <pre><code>REG QUERY HKCR\FirefoxHTML\shell\open\command /ve </code></pre> <p>and this would return</p> <pre><code>! REG.EXE VERSION 3.0 HKEY_CLASSES_ROOT\FirefoxHTML\shell\open\command &lt;NO NAME&gt; REG_SZ "C:\Program Files\Mozilla Firefox\firefox.exe" -requestPending -osint -url "%1" </code></pre> <p>From here, you can parse the returned lines to grab the location of the browser executable.</p> <p>You can do all this using the Java Runtime class:</p> <pre><code>Runtime.getRuntime.exec(cmdString); </code></pre> <p>This requires a lot of customized coding, but you could essentially create your own API to access the default browser under Windows.</p> <p><a href="http://www.rgagnon.com/javadetails/java-0480.html" rel="nofollow noreferrer">Here is an example of accessing the Windows registry in Java.</a></p> <p><a href="http://www.google.com/search?hl=en&amp;q=windows+registry+default+browser&amp;btnG=Search" rel="nofollow noreferrer">You could also search Google for more information on finding default browser in the registry.</a></p> <p>As for other platforms (Mac, Linux, etc), I am sure there is a specific way to get the path to the default browser.</p> <p>Hope this helps!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload